/* =========================================================
   SENAVERSO - PROGRAMA DETALLE (ESTILOS UNIFICADOS)
========================================================= */

.pagina-programa {
  --programa-color: #5224ba;
  --programa-color-rgb: 82, 36, 186;
  --programa-color-claro: #8658eb;
  --programa-color-muy-claro: #f0ebff;
  --senaverso-verde: #57c514;
  --senaverso-verde-claro: #71e42a;
  --senaverso-azul: #061a39;
  --senaverso-azul-profundo: #020e26;
  --texto-principal: #182238;
  --texto-secundario: #60697b;
  --fondo-general: #f6f6f4;
  --fondo-claro: #fafafa;
  --borde-suave: #e8e8ed;
  --radio-card: 20px;

  background: var(--fondo-general);
  color: var(--texto-principal);
}

.pagina-modelado3d {
  --programa-color: #5224ba;
  --programa-color-rgb: 82, 36, 186;
  --programa-color-claro: #8c65e8;
  --programa-color-muy-claro: #f1edff;
}

.pagina-programa main { overflow: hidden; }
.pagina-programa img { max-width: 100%; }
.pagina-programa a { text-decoration: none; }

/* HERO */
.programa-hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: white;
  background-color: var(--senaverso-azul-profundo);
}

.programa-hero-modelado3d {
  background-image:
    linear-gradient(90deg, rgba(2, 14, 38, 0.97) 0%, rgba(2, 14, 38, 0.88) 35%, rgba(2, 14, 38, 0.25) 66%, rgba(2, 14, 38, 0.05) 100%),
    url("../assets/programas/modelado3d/hero-modelado3d.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.min-vh-programa {
  min-height: 540px;
  padding-top: 55px;
  padding-bottom: 70px;
}

.programa-hero-content {
  position: relative;
  z-index: 3;
  max-width: 600px;
}

.programa-mundo-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 15px;
  color: white;
  background: rgba(var(--programa-color-rgb), 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 20px rgba(var(--programa-color-rgb), 0.28);
}

.programa-nivel {
  margin: 0 0 7px;
  color: white;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.programa-hero h1 {
  max-width: 680px;
  margin: 0;
  color: white;
  font-size: clamp(2.4rem, 5.3vw, 4.2rem);
  font-weight: 950;
  line-height: 0.98;
  text-transform: uppercase;
}

.programa-hero h1 span {
  display: block;
  margin-top: 7px;
  color: var(--programa-color-claro);
}

.programa-claim {
  margin-top: 21px;
  margin-bottom: 13px;
  color: var(--senaverso-verde-claro);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 900;
}

.programa-hero-text {
  max-width: 500px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.6;
}

.programa-hero-poderes {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.programa-hero-poderes span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
}

.programa-hero-poderes i {
  color: var(--programa-color-claro);
  font-size: 1rem;
}

.btn-programa {
  padding: 10px 22px;
  color: white;
  background: var(--programa-color);
  border: 1px solid var(--programa-color);
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-programa:hover {
  color: white;
  background: var(--programa-color-claro);
  border-color: var(--programa-color-claro);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--programa-color-rgb), 0.25);
}

/* FICHA TÉCNICA */
.programa-ficha-wrap {
  position: relative;
  z-index: 10;
  margin-top: -35px;
  padding-bottom: 25px;
}

.programa-ficha {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.programa-ficha-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 22px 23px;
}

.programa-ficha-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 0;
  width: 1px;
  height: 60%;
  background: #e4e4e9;
}

.programa-ficha-icon {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  width: 43px;
  height: 43px;
  color: var(--programa-color);
  background: var(--programa-color-muy-claro);
  border-radius: 50%;
  font-size: 1.2rem;
}

.programa-ficha-item span {
  display: block;
  margin-bottom: 2px;
  color: #89909d;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.programa-ficha-item strong {
  display: block;
  color: #161e30;
  font-size: 0.92rem;
  font-weight: 850;
}

.programa-ficha-item small {
  display: block;
  margin-top: 2px;
  color: #687183;
  font-size: 0.68rem;
}

/* SECCIONES GENERALES Y TARJETAS */
.programa-section { position: relative; padding: 36px 0; }
.programa-section-clara { background: #f1f1f0; }

.programa-section-heading { max-width: 760px; margin: 0 auto 28px; }
.programa-section-heading h2 { margin: 4px 0 8px; color: var(--programa-color); font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 900; }
.programa-section-heading p { margin: 0; color: var(--texto-secundario); line-height: 1.5; }

.programa-mini-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--programa-color);
  font-size: clamp(0.84rem, 1.1vw, 0.98rem);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.programa-section-title { margin-bottom: 14px; color: var(--programa-color); font-size: 1.28rem; font-weight: 900; line-height: 1.15; }
.programa-section-title-lg { font-size: clamp(1.6rem, 3vw, 2.15rem); }
.programa-lead { color: #515b6c; font-size: 1rem; line-height: 1.6; }

.programa-card {
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid var(--borde-suave);
  border-radius: var(--radio-card);
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.06);
}

.programa-card-body { position: relative; padding: 23px; }
.programa-card-body-lg { padding: 32px; }

.programa-card-img { width: 100%; height: 230px; object-fit: cover; }
.programa-card-img-vertical { height: 260px; }

.programa-check-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.programa-check-list li { position: relative; padding-left: 24px; color: #535d6e; font-size: 0.79rem; line-height: 1.4; }
.programa-check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; display: flex; justify-content: center; align-items: center;
  width: 17px; height: 17px; color: white; background: #32b84a; border-radius: 50%; font-size: 0.58rem; font-weight: 900;
}

/* RUTA Y CAMINO */
.programa-ruta { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 27px; }
.programa-ruta-item { flex: 1; min-width: 0; text-align: center; }
.programa-ruta-icon { display: flex; justify-content: center; align-items: center; width: 58px; height: 58px; margin: 0 auto 10px; color: var(--programa-color); background: var(--programa-color-muy-claro); border-radius: 50%; font-size: 1.45rem; }
.programa-ruta-item strong { display: block; margin-bottom: 6px; color: #242d3e; font-size: 0.76rem; font-weight: 850; }
.programa-ruta-item p { margin: 0 auto; color: #6b7382; font-size: 0.68rem; line-height: 1.35; }
.programa-ruta-arrow { display: flex; align-items: center; min-height: 58px; color: var(--programa-color); font-size: 1.2rem; }

/* IMÁGENES E MINI FEATURES */
.programa-image-impact { position: relative; min-height: 330px; overflow: hidden; background: #ddd; border-radius: var(--radio-card); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07); }
.programa-image-impact img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }

.programa-mini-feature { height: 100%; padding: 16px; text-align: center; background: #faf9fd; border: 1px solid #ece8f6; border-radius: 15px; }
.programa-mini-feature i { display: block; margin-bottom: 8px; color: var(--programa-color); font-size: 1.35rem; }
.programa-mini-feature strong { display: block; margin-bottom: 4px; color: #252d3d; font-size: 0.76rem; }
.programa-mini-feature span { display: block; color: #777f8d; font-size: 0.66rem; line-height: 1.35; }

/* MISIÓN */
.programa-mision { position: relative; overflow: hidden; padding: 32px 38px; background: white; border: 1px solid var(--borde-suave); border-radius: var(--radio-card); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }
.programa-mision::before { content: ""; position: absolute; left: 0; top: 0; width: 5px; height: 100%; background: var(--programa-color); }
.programa-mision h2 { margin: 0 0 12px; color: var(--programa-color); font-size: 1.65rem; font-weight: 900; }
.programa-mision p { max-width: 650px; color: #626b7a; line-height: 1.55; }
.programa-mision-pregunta { display: block; color: var(--programa-color); }
.programa-mision-img { display: block; max-height: 260px; margin: 0 auto; object-fit: contain; }

/* PROCESO */
.programa-proceso-visual { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 25px; background: white; border: 1px solid var(--borde-suave); border-radius: var(--radio-card); box-shadow: 0 7px 22px rgba(0, 0, 0, 0.05); }
.programa-proceso-item { flex: 1; min-width: 0; text-align: center; }
.programa-proceso-item span { display: block; margin-bottom: 9px; color: #252d3d; font-size: 0.72rem; font-weight: 850; }
.programa-proceso-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid #e7e7ea; border-radius: 14px; }
.programa-proceso-arrow { flex: 0 0 auto; color: var(--programa-color); font-size: 1.6rem; }
.programa-proceso-frase { margin: 20px 0 0; color: #31394b; font-size: 1rem; font-weight: 750; text-align: center; }

/* THREE.JS VISOR */
.explorador-3d-section { padding: 38px 0; background: #ededec; }
.explorador-3d-header { max-width: 760px; margin-bottom: 22px; }
.explorador-3d-eyebrow { display: inline-block; margin-bottom: 7px; padding: 5px 12px; color: var(--programa-color); background: var(--programa-color-muy-claro); border-radius: 50px; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.06em; }
.explorador-3d-header h2 { margin: 0 0 7px; color: #241060; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 950; }
.explorador-3d-header p { max-width: 650px; margin: 0; color: #586071; line-height: 1.55; }

.explorador-3d-panel { display: grid; grid-template-columns: minmax(190px, 0.8fr) minmax(420px, 2.4fr) minmax(155px, 0.62fr); min-height: 520px; overflow: hidden; background: #06162e; border: 1px solid rgba(130, 177, 255, 0.14); border-radius: 24px; box-shadow: 0 15px 35px rgba(0, 13, 40, 0.17); }
.explorador-3d-info { position: relative; z-index: 4; padding: 30px 24px; color: white; background: linear-gradient(160deg, #091d3c, #07142d); border-right: 1px solid rgba(255, 255, 255, 0.08); }
.explorador-3d-info-icon { display: flex; justify-content: center; align-items: center; width: 48px; height: 48px; margin-bottom: 18px; color: #a779ff; background: rgba(var(--programa-color-rgb), 0.20); border: 1px solid rgba(167, 121, 255, 0.35); border-radius: 14px; font-size: 1.35rem; }
.explorador-3d-info h3 { margin-bottom: 12px; color: white; font-size: 1rem; font-weight: 900; line-height: 1.2; }
.explorador-3d-info > p { margin-bottom: 24px; color: #c7d4e8; font-size: 0.79rem; line-height: 1.55; }

.explorador-3d-instrucciones { display: flex; flex-direction: column; gap: 15px; }
.explorador-instruccion { display: flex; gap: 11px; align-items: flex-start; }
.explorador-instruccion > i { margin-top: 2px; color: var(--senaverso-verde-claro); font-size: 1.05rem; }
.explorador-instruccion strong { display: block; color: white; font-size: 0.76rem; }
.explorador-instruccion span { display: block; margin-top: 2px; color: #8fa4c3; font-size: 0.67rem; }

.explorador-3d-nota { display: flex; gap: 10px; margin-top: 28px; padding: 13px; background: rgba(var(--programa-color-rgb), 0.15); border: 1px solid rgba(167, 121, 255, 0.20); border-radius: 13px; }
.explorador-3d-nota > i { flex: 0 0 auto; color: var(--senaverso-verde-claro); font-size: 1rem; }
.explorador-3d-nota p { margin: 0; color: #b9c7dd; font-size: 0.65rem; line-height: 1.45; }
.explorador-3d-nota strong { color: white; }

.explorador-3d-viewport-wrapper { position: relative; min-width: 0; overflow: hidden; background: radial-gradient(circle at center, #12315a 0%, #07162e 48%, #030b19 100%); }
.explorador-3d-viewport { position: relative; width: 100%; height: 100%; min-height: 520px; overflow: hidden; cursor: grab; touch-action: none; }
.explorador-3d-viewport:active { cursor: grabbing; }
.explorador-3d-viewport canvas { display: block; width: 100% !important; height: 100% !important; }

.explorador-3d-model-label { position: absolute; top: 16px; left: 18px; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 7px 11px; color: #dce9f8; background: rgba(2, 12, 28, 0.76); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50px; backdrop-filter: blur(9px); font-size: 0.63rem; font-weight: 800; pointer-events: none; }
.estado-dot { width: 7px; height: 7px; background: var(--senaverso-verde-claro); border-radius: 50%; box-shadow: 0 0 9px rgba(99, 232, 38, 0.8); }

.explorador-3d-help { position: absolute; bottom: 15px; left: 50%; z-index: 20; display: flex; gap: 18px; transform: translateX(-50%); padding: 7px 13px; color: #b9cae3; background: rgba(2, 12, 28, 0.76); border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 40px; backdrop-filter: blur(8px); font-size: 0.62rem; white-space: nowrap; pointer-events: none; }
.explorador-3d-help i { margin-right: 4px; color: var(--senaverso-verde-claro); }

.explorador-3d-controls { position: relative; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 25px 14px; background: #071831; border-left: 1px solid rgba(255, 255, 255, 0.08); }
.control-title { margin-bottom: 5px; color: #7389a8; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; }

.viewer-control { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 8px 10px; color: #afc0d9; background: transparent; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 10px; font-size: 0.67rem; font-weight: 750; text-align: left; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.viewer-control i { width: 18px; color: var(--programa-color-claro); font-size: 1rem; }
.viewer-control:hover, .viewer-control.active { color: white; background: rgba(var(--programa-color-rgb), 0.28); border-color: rgba(167, 121, 255, 0.52); }
.viewer-control:hover { transform: translateY(-1px); }
.viewer-control:disabled { cursor: not-allowed; }
.explorador-3d-controls hr { margin: 7px 0; border-color: rgba(255, 255, 255, 0.08); }

.viewer-3d-loading { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; color: white; background: #07172e; font-size: 0.8rem; }
.viewer-loader { width: 38px; height: 38px; border: 3px solid rgba(255, 255, 255, 0.14); border-top-color: var(--programa-color-claro); border-radius: 50%; animation: viewer-spin 0.85s linear infinite; }
@keyframes viewer-spin { to { transform: rotate(360deg); } }

.viewer-3d-error { position: absolute; inset: 0; z-index: 31; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 20px; color: white; background: #09172b; text-align: center; }
.viewer-3d-error i { color: #ffb439; font-size: 2rem; }
.viewer-3d-error span { color: #97abc8; font-size: 0.7rem; }

.explorador-3d-aprendizaje { display: flex; align-items: center; gap: 15px; margin-top: 14px; padding: 18px 22px; background: white; border: 1px solid #e7e7ee; border-radius: 17px; }
.aprendizaje-icon { display: flex; flex: 0 0 auto; justify-content: center; align-items: center; width: 48px; height: 48px; color: var(--programa-color); background: var(--programa-color-muy-claro); border-radius: 13px; font-size: 1.25rem; }
.explorador-3d-aprendizaje span { display: block; color: var(--programa-color); font-size: 0.62rem; font-weight: 900; }
.explorador-3d-aprendizaje strong { display: block; margin: 2px 0; color: #172238; font-size: 0.86rem; }
.explorador-3d-aprendizaje p { margin: 0; color: #687184; font-size: 0.73rem; line-height: 1.45; }

/* PODERES Y ARSENAL */
.programa-poderes { padding: 40px 0; color: white; background: radial-gradient(circle at 50% 0%, rgba(var(--programa-color-rgb), 0.48), transparent 45%), linear-gradient(135deg, #25106b, #100632); }
.programa-poderes-heading { max-width: 650px; margin: 0 auto 24px; }
.programa-poderes-heading > span { color: var(--senaverso-verde-claro); font-size: clamp(0.84rem, 1.1vw, 0.98rem); font-weight: 950; line-height: 1.05; letter-spacing: 0.055em; text-transform: uppercase; }
.programa-poderes-heading h2 { margin: 4px 0; color: white; font-size: 1.8rem; font-weight: 950; }
.programa-poderes-heading p { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.78rem; }

.programa-poder-card { height: 100%; min-height: 190px; padding: 20px 13px; background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 15px; text-align: center; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.programa-poder-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.09); border-color: rgba(167, 121, 255, 0.6); }
.programa-poder-card i { display: block; margin-bottom: 13px; color: #7feaff; font-size: 2.25rem; text-shadow: 0 0 15px rgba(81, 208, 255, 0.4); }
.programa-poder-card h3 { margin-bottom: 7px; color: white; font-size: 0.83rem; font-weight: 850; }
.programa-poder-card p { margin: 0; color: #c6c2dc; font-size: 0.66rem; line-height: 1.4; }

.programa-arsenal-list { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.programa-arsenal-item { display: flex; align-items: flex-start; gap: 12px; }
.programa-arsenal-item > i { display: flex; flex: 0 0 auto; justify-content: center; align-items: center; width: 34px; height: 34px; color: var(--programa-color); background: var(--programa-color-muy-claro); border-radius: 9px; }
.programa-arsenal-item strong { display: block; color: #2d3443; font-size: 0.76rem; }
.programa-arsenal-item span { display: block; margin-top: 2px; color: #687183; font-size: 0.68rem; line-height: 1.35; }

.programa-aplicaciones-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 24px; }
.programa-aplicaciones-grid > div { text-align: center; }
.programa-aplicaciones-grid i { display: flex; justify-content: center; align-items: center; width: 58px; height: 58px; margin: 0 auto 8px; color: var(--programa-color); background: #f7f5fd; border: 1px solid #ebe7f7; border-radius: 50%; font-size: 1.3rem; }
.programa-aplicaciones-grid span { display: block; color: #495264; font-size: 0.65rem; font-weight: 750; line-height: 1.25; }

.programa-galeria-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 20px; }
.programa-galeria-mini img { width: 100%; aspect-ratio: 1 / 0.78; object-fit: cover; border-radius: 11px; }

/* CONTINUIDAD Y FAQ */
.programa-continuidad { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 28px; }
.programa-continuidad > div { flex: 1; min-width: 0; text-align: center; }
.programa-continuidad > div > i { display: flex; justify-content: center; align-items: center; width: 52px; height: 52px; margin: 0 auto 8px; color: var(--programa-color); background: var(--programa-color-muy-claro); border-radius: 50%; font-size: 1.2rem; }
.programa-continuidad > i { color: var(--programa-color); }
.programa-continuidad strong { display: block; color: #242d3e; font-size: 0.69rem; }
.programa-continuidad span { display: block; margin-top: 4px; color: #77808e; font-size: 0.62rem; line-height: 1.3; }

.programa-faq { max-width: 1040px; margin: 0 auto; }
.programa-faq .accordion-item { overflow: hidden; margin-bottom: 8px; background: white; border: 1px solid #e7e7eb; border-radius: 11px !important; }
.programa-faq .accordion-button { padding: 15px 18px; color: #31394a; background: white; box-shadow: none; font-size: 0.8rem; font-weight: 750; }
.programa-faq .accordion-button:not(.collapsed) { color: var(--programa-color); background: var(--programa-color-muy-claro); }
.programa-faq .accordion-button:focus { box-shadow: none; }
.programa-faq .accordion-body { padding: 5px 18px 18px; color: #626b79; font-size: 0.78rem; line-height: 1.55; }

.programa-cierre { padding: 25px 0 42px; background: var(--fondo-general); }
.programa-cierre-inner { position: relative; overflow: hidden; padding: 25px 35px; color: white; background: radial-gradient(circle at 15% 50%, rgba(var(--programa-color-rgb), 0.46), transparent 30%), linear-gradient(110deg, #16054f, #060c35); border-radius: 20px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.13); }
.programa-cierre-lian { display: block; max-height: 220px; margin: 0 auto; object-fit: contain; }
.programa-cierre-label { display: inline-block; margin-bottom: 7px; color: var(--senaverso-verde-claro); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.05em; }
.programa-cierre-mini { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 0.72rem; font-weight: 800; }
.programa-cierre h2 { margin: 2px 0 8px; color: white; font-size: clamp(2rem, 4vw, 3rem); font-weight: 950; }
.programa-cierre p { max-width: 540px; margin-bottom: 0; color: #d7d5e9; font-size: 0.8rem; line-height: 1.5; }
.programa-cierre-link { display: block; margin-top: 13px; color: rgba(255, 255, 255, 0.76); font-size: 0.68rem; text-decoration: underline !important; }
.programa-cierre-link:hover { color: white; }

/* =========================================================
   REGLAS UNIFICADAS Y DEFINITIVAS - TARJETA DE PROYECCIÓN
========================================================= */

.servicio-card {
  position: relative;
  overflow: hidden;
}

.servicio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  grid-template-areas:
    "texto visual"
    "lista visual";
  grid-template-rows: auto 1fr;
  min-height: 430px;
  height: 100%;
}

.servicio-texto {
  grid-area: texto;
  position: relative;
  z-index: 3;
  padding: 28px 10px 0 28px;
}

.servicio-texto p {
  max-width: 100%;
  margin: 0;
  color: var(--texto-principal);
  line-height: 1.55;
}

.servicio-lista {
  grid-area: lista;
  position: relative;
  z-index: 3;
  align-self: start;
  margin: 14px 10px 28px 28px;
}

.servicio-visual {
  grid-area: visual;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 430px;
  overflow: hidden;
}

.servicio-img {
  display: block;
  pointer-events: none;
  user-select: none;
}

/* ESCRITORIO BASE (>= 1200px) */
@media (min-width: 1200px) {
  .servicio-img-desktop {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 0;
    width: auto;
    height: 108%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-50%);
  }
  .servicio-img-mobile { display: none; }
}

/* ESCRITORIO INTERMEDIO (992px - 1199.98px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .servicio-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(200px, 0.82fr);
    min-height: 430px;
  }
  .servicio-visual { min-height: 430px; }
  .servicio-img-desktop {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 0;
    width: auto;
    height: 98%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-50%);
  }
  .servicio-img-mobile { display: none; }
}

/* TABLET Y MÓVIL (< 991.98px) - CAMBIO A IMAGEN DE MEDIO CUERPO */
@media (max-width: 991.98px) {
  .servicio-img-desktop { display: none; }

  .servicio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
    grid-template-areas:
      "texto texto"
      "lista visual";
    grid-template-rows: auto auto;
    min-height: 0;
    height: auto;
  }

  .servicio-texto { padding: 24px 24px 0 24px; }
  .servicio-lista { align-self: center; margin: 16px 5px 24px 24px; }

  .servicio-visual {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    align-self: end;
    width: 100%;
    height: 250px;
    min-height: 250px;
    padding-top: 18px; /* Margen superior de seguridad para no cortar el cabello */
    box-sizing: border-box;
    overflow: hidden;
  }

  .servicio-img-mobile {
    display: block;
    position: relative;
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transform: none;
    margin: 0 auto;
  }
}

/* TELÉFONO (< 767.98px) */
@media (max-width: 767.98px) {
  .servicio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(145px, 0.62fr);
  }
  .servicio-texto { padding: 20px 20px 0 20px; }
  .servicio-lista { margin: 14px 2px 20px 20px; }
  .servicio-visual { height: 230px; min-height: 230px; padding-top: 16px; }
  .servicio-img-mobile { height: 100%; max-width: 100%; max-height: 100%; }
}

/* TELÉFONO PEQUEÑO (< 575.98px) */
@media (max-width: 575.98px) {
  .servicio-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(120px, 0.75fr);
  }
  .servicio-texto { padding: 18px 18px 0 18px; }
  .servicio-lista { margin: 12px 0 18px 18px; }
  .servicio-visual { height: 210px; min-height: 210px; padding-top: 14px; }
  .servicio-img-mobile { height: 100%; max-width: 100%; max-height: 100%; }
}

/* TELÉFONO MUY ESTRECHO (< 420px) */
@media (max-width: 419.98px) {
  .servicio-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(105px, 0.68fr);
  }
  .servicio-visual { height: 195px; min-height: 195px; padding-top: 12px; }
  .servicio-img-mobile { height: 100%; max-width: 100%; max-height: 100%; }
}

/* OTROS BREAKPOINTS Y ACCESIBILIDAD */
@media (max-width: 991.98px) {
  .programa-hero-modelado3d { background-position: 62% center; }
  .programa-hero-modelado3d::before { content: ""; position: absolute; inset: 0; background: rgba(2, 14, 38, 0.32); }
  .min-vh-programa { min-height: 510px; }
  .programa-ficha { grid-template-columns: repeat(2, 1fr); }
  .programa-ficha-item:nth-child(2)::after { display: none; }
  .programa-ficha-item:nth-child(-n+2) { border-bottom: 1px solid #e8e8ec; }
  .programa-ruta { flex-wrap: wrap; justify-content: center; }
  .programa-ruta-item { flex: 0 0 28%; }
  .explorador-3d-panel { grid-template-columns: 1fr; }
  .explorador-3d-info { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .explorador-3d-instrucciones { display: grid; grid-template-columns: repeat(3, 1fr); }
  .explorador-3d-viewport { height: 500px; min-height: 500px; }
  .explorador-3d-controls { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .control-title { grid-column: 1 / -1; }
  .explorador-3d-controls hr { display: none; }
  .programa-aplicaciones-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767.98px) {
  .programa-hero { min-height: 610px; }
  .programa-hero-modelado3d { background-position: 64% center; }
  .programa-hero-modelado3d::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 14, 38, 0.85) 0%, rgba(2, 14, 38, 0.55) 43%, rgba(2, 14, 38, 0.93) 100%); }
  .programa-hero-content { z-index: 4; }
  .min-vh-programa { align-items: flex-end !important; min-height: 610px; padding-top: 90px; padding-bottom: 55px; }
  .programa-hero h1 { font-size: 2.35rem; }
  .programa-hero-text { font-size: 0.9rem; }
  .programa-ficha-wrap { margin-top: -22px; }
  .programa-ficha-item { padding: 16px; }
  .programa-section { padding: 27px 0; }
  .programa-card-img-vertical { height: 100%; min-height: 235px; }
  .programa-ruta { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .programa-ruta-item { display: grid; grid-template-columns: 50px 1fr; column-gap: 12px; align-items: center; width: 100%; text-align: left; }
  .programa-ruta-icon { grid-row: 1 / 3; width: 48px; height: 48px; margin: 0; font-size: 1.15rem; }
  .programa-ruta-item strong { align-self: end; margin: 0; }
  .programa-ruta-item p { align-self: start; margin: 0; }
  .programa-ruta-arrow { justify-content: center; min-height: 20px; transform: rotate(90deg); }
  .programa-proceso-visual { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .programa-proceso-arrow { display: none; }
  .programa-poder-card { min-height: 180px; }
  .programa-continuidad { flex-direction: column; }
  .programa-continuidad > i { transform: rotate(90deg); }
  .programa-galeria-mini { grid-template-columns: repeat(2, 1fr); }
  .explorador-3d-info { padding: 22px; }
  .explorador-3d-viewport { height: 460px; min-height: 460px; }
  .explorador-3d-controls { grid-template-columns: repeat(2, 1fr); padding: 14px; }
  .viewer-control { justify-content: center; min-height: 46px; text-align: center; }
  .explorador-3d-aprendizaje { align-items: flex-start; }
}

@media (max-width: 575.98px) {
  .programa-mundo-badge { font-size: 0.62rem; }
  .programa-hero h1 { font-size: 2rem; }
  .programa-claim { font-size: 1rem; }
  .programa-hero-poderes { gap: 10px; }
  .programa-hero-poderes span { font-size: 0.67rem; }
  .programa-ficha { grid-template-columns: 1fr; }
  .programa-ficha-item { border-bottom: 1px solid #e8e8ec; }
  .programa-ficha-item::after { display: none; }
  .programa-ficha-item:last-child { border-bottom: 0; }
  .programa-card-body, .programa-card-body-lg { padding: 19px; }
  .programa-mision { padding: 24px 21px; }
  .programa-proceso-visual { padding: 15px; }
  .programa-proceso-frase { font-size: 0.88rem; }
  .explorador-3d-section { padding: 27px 0; }
  .explorador-3d-header h2 { font-size: 1.45rem; }
  .explorador-3d-header p { font-size: 0.83rem; }
  .explorador-3d-panel { border-radius: 17px; }
  .explorador-3d-instrucciones { grid-template-columns: 1fr; }
  .explorador-3d-viewport { height: 430px; min-height: 430px; }
  .explorador-3d-model-label { top: 10px; left: 10px; font-size: 0.56rem; }
  .explorador-3d-help { bottom: 9px; gap: 10px; font-size: 0.55rem; }
  .explorador-3d-aprendizaje { padding: 15px; }
  .programa-poderes-heading h2 { font-size: 1.5rem; }
  .programa-poder-card { min-height: 165px; padding: 18px 10px; }
  .programa-poder-card i { font-size: 1.8rem; }
  .programa-aplicaciones-grid { grid-template-columns: repeat(2, 1fr); }
  .programa-cierre-inner { padding: 22px; text-align: center; }
  .programa-cierre h2 { font-size: 2rem; }
  .programa-cierre p { margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .programa-card, .programa-poder-card, .btn-programa, .viewer-control { transition: none; }
  .viewer-loader { animation-duration: 2s; }
}