/* =========================================================
   EMBRIO ATLAS — MT.EDUCATION
   ========================================================= */

* {
  box-sizing: border-box;
}

#embrio-atlas {
  width: 100%;
  min-height: 100vh;
  background: #05070a;
  color: #f4f6f8;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
}


/* =========================================================
   HEADER
   ========================================================= */

.ea-header {
  height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid #20262d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ea-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.ea-brand span {
  color: #b79b5b;
}

.ea-menu {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.ea-menu button {
  background: none;
  border: 0;
  color: #aaa;
  cursor: pointer;
  font-size: 14px;
}

.ea-menu button:hover,
.ea-menu button.active {
  color: #fff;
}


/* =========================================================
   SELECTOR DE ETAPA
   ========================================================= */

.ea-stage {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  border-bottom: 1px solid #20262d;
}

.ea-stage button {
  width: 38px;
  height: 38px;
  border: 1px solid #343b44;
  background: #11151a;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.ea-stage button:hover {
  border-color: #b79b5b;
}

.ea-stage-title {
  text-align: center;
}

.ea-stage-title small {
  display: block;
  color: #8d949c;
  font-size: 11px;
  letter-spacing: 2px;
}

.ea-stage-title strong {
  font-size: 20px;
}


/* =========================================================
   ÁREA PRINCIPAL
   ========================================================= */

.ea-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  min-height: 500px;
}


/* =========================================================
   VISOR 3D
   ========================================================= */

.ea-viewer {
  position: relative;
  min-height: 500px;
  overflow: hidden;

  background:
    radial-gradient(
      circle at center,
      #17202a 0%,
      #090c10 48%,
      #05070a 75%
    );
}

.ea-model-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 500px;
}

#embryo-three-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#embryo-three-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#embryo-three-viewer canvas:active {
  cursor: grabbing;
}


/* =========================================================
   ESTRUCTURA SELECCIONADA
   ========================================================= */

#ea-selection {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;

  min-width: 190px;

  padding: 10px 14px;

  background: rgba(8, 12, 16, 0.78);

  border: 1px solid rgba(0, 207, 255, 0.45);
  border-radius: 8px;

  box-shadow:
    0 0 18px
    rgba(0, 207, 255, 0.08);

  backdrop-filter: blur(8px);

  pointer-events: none;
}

#ea-selection span {
  display: block;

  color: #00cfff;

  font-size: 9px;

  letter-spacing: 1.5px;

  margin-bottom: 4px;
}

#ea-selection strong {
  color: #e7ebef;

  font-size: 12px;

  font-weight: 500;
}


/* =========================================================
   AYUDA DEL VISOR
   ========================================================= */

.ea-help {
  position: absolute;

  bottom: 18px;
  left: 22px;

  z-index: 10;

  color: #727b84;

  font-size: 12px;

  pointer-events: none;
}


/* =========================================================
   PANEL DERECHO
   ========================================================= */

.ea-info {
  border-left: 1px solid #20262d;

  background: #0b0e12;

  padding: 28px;
}

.ea-label {
  color: #b79b5b;

  font-size: 11px;

  letter-spacing: 2px;

  margin-bottom: 8px;
}

.ea-info h2 {
  margin: 0 0 18px;

  font-size: 26px;
}

.ea-info p {
  color: #aab0b6;

  line-height: 1.6;

  font-size: 14px;
}

.ea-data {
  margin-top: 25px;

  border-top: 1px solid #252b32;
}

.ea-row {
  padding: 14px 0;

  border-bottom: 1px solid #252b32;
}

.ea-row small {
  display: block;

  color: #707983;

  margin-bottom: 5px;
}

.ea-row strong {
  font-size: 14px;
}


/* =========================================================
   BOTÓN VOLVER
   ========================================================= */

#ea-back-stage {
  display: none;

  width: 100%;

  margin-top: 22px;

  padding: 11px 14px;

  background: #11161c;

  border: 1px solid #303841;

  border-radius: 7px;

  color: #aab0b6;

  font-size: 12px;

  cursor: pointer;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

#ea-back-stage:hover {
  color: #fff;

  border-color: #b79b5b;

  background: #151b22;
}


/* =========================================================
   TIMELINE
   ========================================================= */

.ea-timeline {
  min-height: 92px;

  border-top: 1px solid #20262d;

  padding: 17px 25px;

  overflow-x: auto;
}

.ea-timeline-track {
  position: relative;

  min-width: 800px;

  display: flex;

  justify-content: space-between;

  align-items: flex-start;
}

.ea-timeline-track::before {
  content: "";

  position: absolute;

  top: 9px;

  left: 3%;
  right: 3%;

  height: 1px;

  background: #343b43;
}

.ea-time {
  position: relative;

  width: 75px;

  text-align: center;

  color: #747d86;

  font-size: 11px;

  cursor: pointer;
}

.ea-dot {
  position: relative;

  z-index: 2;

  width: 18px;
  height: 18px;

  margin: 0 auto 9px;

  background: #11161c;

  border: 2px solid #4c555e;

  border-radius: 50%;
}

.ea-time.active {
  color: #fff;
}

.ea-time.active .ea-dot {
  background: #c3a664;

  border-color: #c3a664;

  box-shadow:
    0 0 0 5px
    rgba(195, 166, 100, 0.12);
}


/* =========================================================
   RESPONSIVE — CELULAR / TABLET
   ========================================================= */

@media (max-width: 768px) {

  .ea-header {
    height: auto;
    padding: 18px;
    display: block;
  }

  .ea-brand {
    text-align: center;
    margin-bottom: 15px;
  }

  .ea-menu {
    overflow-x: auto;
    gap: 22px;
    justify-content: flex-start;
    padding-bottom: 5px;
  }

  .ea-menu button {
    white-space: nowrap;
  }

  .ea-stage {
    gap: 16px;
  }

  .ea-main {
    display: flex;
    flex-direction: column;
  }

  .ea-viewer {
    min-height: 55vh;
  }

  .ea-model-container {
    min-height: 55vh;
  }

  .ea-info {
    border-left: 0;

    border-top: 1px solid #20262d;

    padding: 22px;
  }

  #ea-selection {
    top: 12px;
    left: 12px;

    min-width: 160px;
  }

  .ea-help {
    left: 14px;
    bottom: 12px;

    font-size: 10px;
  }

}


/* =========================================================
   ETIQUETA FLOTANTE 3D
   ========================================================= */

#ea-structure-label {
  position: absolute;
  z-index: 20;

  display: none;

  transform: translate(-50%, -100%);
  margin-top: -14px;

  pointer-events: none;
}

#ea-structure-label span {
  display: block;

  padding: 7px 11px;

  background: rgba(5, 10, 14, 0.92);

  border: 1px solid rgba(0, 207, 255, 0.65);
  border-radius: 6px;

  color: #ffffff;

  font-size: 11px;
  font-weight: 500;

  white-space: nowrap;

  box-shadow:
    0 0 16px rgba(0, 207, 255, 0.12);

  backdrop-filter: blur(6px);
}

#ea-structure-label::after {
  content: "";

  position: absolute;

  left: 50%;
  top: 100%;

  width: 1px;
  height: 14px;

  background: rgba(0, 207, 255, 0.7);
}


/* =========================================================
   FIX — CAPAS DEL VISOR 3D
   ========================================================= */

.ea-model-container {
  position: absolute;
  inset: 0;
  overflow: visible;
}

#embryo-three-viewer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#embryo-three-viewer canvas {
  position: relative;
  z-index: 1;
}

#ea-selection {
  z-index: 30;
}

#ea-structure-label {
  position: absolute;
  z-index: 50;

  display: none;

  transform: translate(-50%, -100%);

  margin-top: -16px;

  pointer-events: none;
}

#ea-structure-label span {
  display: block;

  padding: 7px 11px;

  background: rgba(5, 10, 14, 0.94);

  border: 1px solid #00cfff;
  border-radius: 6px;

  color: #ffffff;

  font-size: 11px;
  font-weight: 500;

  white-space: nowrap;

  box-shadow:
    0 0 18px rgba(0, 207, 255, 0.22);
}

#ea-structure-label::after {
  content: "";

  position: absolute;

  top: 100%;
  left: 50%;

  width: 1px;
  height: 16px;

  background: #00cfff;
}