/* ── Ecosistema Dashboard Layout ─────────────────────────── */

.ecosistema-wrapper {
  background-image:
    radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.08), transparent 25%);
}

.eco-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 1350px;
}

@media (min-width: 1024px) {
  .eco-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(170px, auto);
  }

  .tile-profile {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile-exp {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile-stack {
    grid-column: span 4;
    grid-row: span 1;
  }

  .tile-location {
    grid-column: span 1;
    grid-row: span 1;
  }

  .tile-edu {
    grid-column: span 1;
    grid-row: span 1;
  }

  .tile-cta {
    grid-column: span 2;
    grid-row: span 1;
  }
}

.eco-tile {
  position: relative;
  background: rgba(18, 18, 18, 0.7) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.eco-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #00f0ff, #7000ff, #ff007f);
  opacity: 0.7;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
  border-radius: 24px 24px 0 0;
}

.eco-tile:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(0, 240, 255, 0.4) !important;
  box-shadow:
    0 10px 30px -10px rgba(0, 240, 255, 0.15),
    inset 0 0 20px rgba(112, 0, 255, 0.05) !important;
}

.eco-tile:hover::before {
  opacity: 1;
  box-shadow: 0 0 15px #00f0ff;
}

.eco-badge {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  color: #e5e7eb !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- MOSAICO CARDS (Tus 6 experiencias) --- */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  flex: 1;
}

@media (max-width: 768px) {
  .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mosaic-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 14px 8px;
  transition: border-color 0.3s;
  min-height: 170px;
  /* CRÍTICO: Aumentado para que el texto respire */
}

.mosaic-card:hover,
.mosaic-card:focus {
  border-color: #00f0ff;
  outline: none;
}

.mosaic-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: opacity 0.3s;
}

.mosaic-kpi {
  font-size: 1.6rem;
  font-weight: 800;
  color: #00f0ff !important;
  font-family: 'Space Mono', monospace;
  line-height: 1;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.mosaic-company {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff !important;
  text-transform: uppercase;
}

.mosaic-role {
  font-size: 0.68rem;
  color: #ff007f !important;
}

.mosaic-reveal {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 12, 0.96);
  backdrop-filter: blur(8px);
  padding: 16px 12px;
  /* Aumentado para no pegar en los bordes */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: top 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
  overflow-y: auto;
  /* Permite scroll interno si el texto es muy largo */
}

/* Micro-Scrollbar Neón para las tarjetas */
.mosaic-reveal::-webkit-scrollbar {
  width: 3px;
}

.mosaic-reveal::-webkit-scrollbar-track {
  background: transparent;
}

.mosaic-reveal::-webkit-scrollbar-thumb {
  background: #00f0ff;
  border-radius: 3px;
}

.mosaic-card:hover .mosaic-reveal,
.mosaic-card:focus .mosaic-reveal {
  top: 0;
}

.mosaic-reveal p {
  font-size: 0.75rem;
  /* Un poco más grande para mejor lectura */
  color: #e2e8f0 !important;
  line-height: 1.5;
  /* Mejor legibilidad */
  margin: auto 0;
  /* Centrado perfecto verticalmente */
  width: 100%;
  /* Asegura que respete los límites */
  padding-right: 12px;
}

/* --- MARQUESINA TÉCNICA --- */
.marquee-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-content {
  display: flex;
  gap: 20px;
  animation: scrollMarquee 25s linear infinite;
  white-space: nowrap !important;
  padding: 8px 0;
  width: max-content;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #d1d5db !important;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

/* --- ESTILOS EXTRA (Chat, Ubicación, etc.) --- */
.eco-status-dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  margin-right: 6px;
  animation: eco-pulse 2s infinite;
}

@keyframes eco-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.chat-chip {
  font-size: 0.75rem;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #e2e8f0 !important;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Space Mono', monospace;
}

.chat-chip:hover {
  background: rgba(112, 0, 255, 0.2);
  border-color: #00f0ff;
  color: #fff !important;
}