/* ========================= */
/* 🌐 BASE */
/* ========================= */

html, body {
  margin: 0;
  height: 100%;
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, sans-serif;

  background:
    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
    url("fondo.png") no-repeat center center fixed;

  background-size: cover;
  color: #fff;
}


/* ========================= */
/* 📦 CONTENEDOR PRINCIPAL */
/* ========================= */

.mapa-procesos {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 20px;
  box-sizing: border-box;
}


/* ========================= */
/* 🧠 HEADER */
/* ========================= */

.header {
  text-align: center;
  margin-bottom: 10px;
}

.header h1 {
  font-size: 60px;
  margin: 0;
  font-weight: 900;
}

.header h2 {
  font-size: 28px;
  color: #eb2217;
  margin-top: 5px;
}


/* ========================= */
/* 🚒 CAMIÓN */
/* ========================= */

.camion-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: auto;

  padding: 20px;
  border-radius: 20px;

  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);

  box-shadow: 0 20px 40px rgba(0,0,0,0.5);

  animation: subir 0.8s ease;
}

.camion {
  width: 100%;
  display: block;

  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6));

  /* posición inicial */
  opacity: 0;
  transform: translateX(700px);

  /* animación */
  animation: entradaCamion 1.8s ease-out forwards;
}


/* ========================= */
/* ⬆️ ANIMACIÓN GENERAL */
/* ========================= */

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ========================= */
/* ➕ BOTONES */
/* ========================= */

.punto {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;

  font-size: 20px;
  font-weight: bold;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.3s;
  z-index: 10;

  /* 👇 animación de aparición */
  opacity: 0;
  animation: aparecerBotones .5s ease forwards;
  animation-delay: 1.8s;
}

.punto:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

/* EFECTO PULSO */
.punto::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  animation: pulso 2s infinite;
}

@keyframes pulso {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}


/* ========================= */
/* 🎯 COLORES BOTONES */
/* ========================= */

.punto[data-target^="apoyo"] {
  background: #457029;
  color: #fff;
}

.punto[data-target="estrategicos"] {
  background: #003266;
  color: #fff;
}

.punto[data-target="control"] {
  background: #e99414;
  color: #ffffff;
}

.punto[data-target^="misional"] {
  background: #B41400;
  color: #fff;
}


/* ========================= */
/* 📦 CARDS */
/* ========================= */

.card {
  position: absolute;
  width: 260px;
  padding: 15px;
  border-radius: 14px;
  display: none;
  z-index: 20;

  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
  text-align: left;
}

.card.active {
  display: block;
  animation: aparecerCard 0.4s ease;
}


/* ANIMACIÓN DESDE ABAJO */
@keyframes aparecerCard {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================= */
/* 🚒 ENTRADA DEL CAMIÓN */
/* ========================= */

@keyframes entradaCamion {

  0% {
    opacity: 0;
    transform: translateX(700px);
  }

  70% {
    opacity: 1;
    transform: translateX(-25px);
  }

  85% {
    transform: translateX(8px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================= */
/* ➕ APARICIÓN BOTONES */
/* ========================= */

@keyframes aparecerBotones {

  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

}

/* TITULOS */
.card h3,
.card h4,
.card h5,
.card h6 {
  margin-top: 0;
  text-align: center;
}

/* TEXTO */
.card p,
.card li {
  font-size: 18px;
  line-height: 1.6;
}

.card ul {
  padding-left: 18px;
}


/* ========================= */
/* 🎨 COLORES TARJETAS */
/* ========================= */

.card.apoyo {
  background: #353A34;
  color: #ffffff;
}

.card.estrategico {
  background: #264a5c;
  color: #ffffff;
}

.card.control {
  background: #F2ECE0;
  color: #000000;
}

.card.misional {
  background: #FFC9C9;
  color: #000000;
}


/* ========================= */
/* 🧩 BORDES */
/* ========================= */

#estrategicos {
  border-left: 6px solid #003266;
}

#misional1, #misional2, #misional3 {
  border-top: 6px solid #B40607;
}

#apoyo1, #apoyo2, #apoyo3, #apoyo4, #apoyo5 {
  border-top: 6px solid #2e7d32;
}

#control {
  border-left: 6px solid #E9BD14;
}


/* ========================= */
/* 🖼 IMÁGENES */
/* ========================= */

.card-img {
  width: 80%;
  max-width: 130px;
  display: block;
  margin: 15px auto 0;

  border-radius: 10px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}


/* ========================= */
/* 🔗 LÍNEA */
/* ========================= */

.linea-conexion {
  position: absolute;
  width: 2px;
  height: 0;
  background: #ff5252;
  z-index: 5;
  transform-origin: top;
  display: none;
}

.linea-conexion.active {
  display: block;
  animation: crecerLinea 0.3s ease forwards;
}

@keyframes crecerLinea {
  from { height: 0; }
  to { height: 80px; }
}


/* ========================= */
/* 🔊 BOTÓN MÚSICA */
/* ========================= */

#btnMusica {
  position: fixed;
  bottom: 20px;
  right: 20px;

  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;

  font-size: 20px;
  cursor: pointer;

  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}


/* ========================= */
/* 📱 MOBILE */
/* ========================= */

@media (max-width: 768px) {

  .header h1 {
    font-size: 32px;
  }

  .header h2 {
    font-size: 16px;
  }

  .punto {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .card {
    position: fixed;
    left: 5% !important;
    right: 5% !important;
    width: auto;
    bottom: 20px;
    top: auto !important;

    max-height: 60vh;
    overflow-y: auto;
  }

}
/* ========================= */
/* 📊 PANELES INFOGRAFÍA */
/* ========================= */

/* CONTENEDOR PADRE */
.mapa-procesos {
  position: relative;
}

/* PANEL IZQUIERDO */
.panel-izq {
  position: absolute;
  top: 120px;
  left: 20px;

  width: 220px;
  padding: 15px;

  background: rgba(255,255,255,0.95);
  color: #000;

  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);

  z-index: 30;

  animation: slideIzq 0.6s ease;
}

/* PANEL DERECHO */
.panel-der {
  position: absolute;
  top: 120px;
  right: 20px;

  width: 240px;
  padding: 15px;

  background: rgba(255,255,255,0.95);
  color: #000;

  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);

  z-index: 30;

  animation: slideDer 0.6s ease;
}

/* TITULOS */
.panel-izq h3,
.panel-der h3 {
  margin-top: 0;
  text-align: center;
  font-size: 16px;
}

/* ITEMS */
.panel-izq .item {
  margin: 8px 0;
  font-size: 14px;
}

/* LISTAS */
.panel-der ul {
  padding-left: 18px;
  font-size: 14px;
}


/* ========================= */
/* 🔄 FLUJO DE PROCESOS */
/* ========================= */

.flujo {
  display: flex;
  justify-content: center;
  align-items: center;

  margin: 20px auto 25px;
}

.flujo span,
.flujo {
  background: rgba(20, 35, 50, 0.75);
  backdrop-filter: blur(10px);

  padding: 14px 28px;
  border-radius: 40px;

  color: #ffffff;
  font-weight: 700;
  font-size: 20px;

  border: 1px solid rgba(255,255,255,0.10);

  /* 🔥 sombra corregida (sin brillo blanco) */
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);

  transition: all 0.3s ease;
}

/* pequeño efecto hover elegante */
.flujo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}


/* ========================= */
/* ✨ ANIMACIONES */
/* ========================= */

@keyframes slideIzq {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDer {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
#btnMusica {
  z-index: 9999;
}
.punto.activo {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.instruccion {
  position: fixed;
  bottom: 20px;
  left: 18%;
  transform: translateX(-50%);

  background: rgba(0,0,0,0.8);
  color: #fff;

  padding: 12px 18px;
  border-radius: 30px;

  font-size: 14px;
  text-align: left;

  z-index: 100;
  backdrop-filter: blur(5px);
}
.instruccion {
  position: absolute;
  bottom: 20px;
  left: 250px;

  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 18px;
  border-radius: 25px;

  font-size: 14px;
  z-index: 30;

  display: flex;
  align-items: center;
  gap: 10px;
}

/* BOTÓN CERRAR */
.cerrar-instruccion {
  cursor: pointer;
  font-weight: bold;
  background: #c62828;
  border-radius: 50%;
  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
}

.cerrar-instruccion:hover {
  background: #ff5252;
}

/* 🟦 ENTRADA */
.card.entrada {
  background: #24496b;
  color: #fff;
}

.punto[data-target="entrada"] {
  background: #003266;
  color: #fff;
}

/* 🟩 IMPACTO */
.card.impacto {
  background: #264d2f;
  color: #fff;
}

.punto[data-target="impacto"] {
  background: #2e7d32;
  color: #fff;
}