/* ==========================================================================
   Skills Ecosystem Component Styles
   Inspired by Cisco Webex integration diagram architecture
   Clean, light, modular SVG + HTML/CSS system
   ========================================================================== */

.skills-ecosystem {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.skills-ecosystem.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Seamless Dotted Canvas Area (No box, no border) */
.skills-ecosystem__canvas-area {
  position: relative;
  width: 100%;
  height: 680px;
  background: transparent;
  box-sizing: border-box;
}

/* Subtle dotted grid strictly on background layer so cards stay 100% crisp */
.skills-ecosystem__canvas-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(100, 116, 139, 0.16) 1.25px, transparent 1.25px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 98%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 98%);
  pointer-events: none;
  z-index: 1;
}

/* SVG Connector Layer */
.skills-ecosystem__svg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* HTML Nodes Container */
.skills-ecosystem__nodes-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* Status Dot Component */
.eco-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
  display: inline-block;
  flex-shrink: 0;
  animation: ecoStatusPulse 2.4s infinite ease-in-out;
}

@keyframes ecoStatusPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.08);
  }
}

/* ==========================================================================
   CENTER NODE: Large Card with Teal-to-Blue Gradient Glow Border
   ========================================================================== */
.eco-center-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  padding: 2px; /* border gradient container */
  border-radius: 26px;
  background: linear-gradient(135deg, #0d9488 0%, #06b6d4 50%, #2563eb 100%);
  box-shadow: 0 16px 48px rgba(13, 148, 136, 0.22), 0 0 30px rgba(37, 99, 235, 0.16);
  z-index: 5;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  animation: ecoCenterGlow 4s ease-in-out infinite alternate;
}

@keyframes ecoCenterGlow {
  0% {
    box-shadow: 0 16px 44px rgba(13, 148, 136, 0.22), 0 0 24px rgba(37, 99, 235, 0.16);
  }
  100% {
    box-shadow: 0 20px 54px rgba(13, 148, 136, 0.32), 0 0 40px rgba(37, 99, 235, 0.28);
  }
}

.eco-center-card__inner {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 38px 20px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.eco-center-card__inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, transparent 100%);
  pointer-events: none;
}

.eco-center-card__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: #2b2b2b; /* dark grey, not pure black */
  margin: 0;
  letter-spacing: -0.02em;
  font-family: var(--font-display, var(--font-body, inherit));
  text-align: center;
  max-width: 210px;
}

/* ==========================================================================
   LEFT SIDE: 4 White Rounded Skill Cards with Soft Shadows
   ========================================================================== */
.eco-left-card {
  position: absolute;
  width: 290px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
  box-sizing: border-box;
  z-index: 5;
}

.eco-left-card:hover {
  transform: translateX(4px) translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.15);
}

.eco-left-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.eco-left-card__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eco-left-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.eco-left-card__badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.eco-badge--purple { background: #f3e8ff; color: #7e22ce; }
.eco-badge--green  { background: #dcfce7; color: #15803d; }
.eco-badge--orange { background: #ffedd5; color: #c2410c; }
.eco-badge--blue   { background: #dbeafe; color: #1d4ed8; }

.eco-left-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.eco-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: #334155;
  transition: background-color 0.2s, border-color 0.2s;
}

.eco-tag:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.eco-tag svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   RIGHT SIDE: 4 Dashed-Circle Skill Nodes
   ========================================================================== */
.eco-right-node {
  position: absolute;
  width: 250px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 2px dashed #94a3b8;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s;
  cursor: default;
  box-sizing: border-box;
}

.eco-right-node:hover {
  transform: translateX(-4px) translateY(-2px);
  border-color: #0284c7;
  background: #FFFFFF;
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.12);
}

.eco-right-node__icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.eco-right-node:hover .eco-right-node__icon-circle {
  background: #e0f2fe;
  color: #0369a1;
}

.eco-right-node__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eco-right-node__title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eco-right-node__desc {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin: 2px 0 0 0;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

/* ==========================================================================
   SVG CONNECTOR PATHS & LABELS
   ========================================================================== */
.eco-connector-path {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  transition: stroke-width 0.25s, filter 0.25s;
}

.eco-path--purple { stroke: #c084fc; }
.eco-path--green  { stroke: #4ade80; }
.eco-path--orange { stroke: #fb923c; }
.eco-path--blue   { stroke: #60a5fa; }
.eco-path--grey   { stroke: #cbd5e1; stroke-dasharray: 4 4; stroke-width: 1.75; }

/* Hover highlights connection */
.eco-left-card[data-conn="workflows"]:hover ~ svg .eco-path--purple,
.eco-left-card[data-conn="crm"]:hover ~ svg .eco-path--green,
.eco-left-card[data-conn="agents"]:hover ~ svg .eco-path--orange,
.eco-left-card[data-conn="voice"]:hover ~ svg .eco-path--blue {
  stroke-width: 3.5px;
  filter: drop-shadow(0 0 6px currentColor);
}

/* ==========================================================================
   RESPONSIVE DESIGN: Smooth Transformation for Tablet & Mobile (<= 768px)
   ========================================================================== */
@media (max-width: 900px) {
  .skills-ecosystem__canvas-area {
    height: auto;
    min-height: auto;
    padding: 20px 10px 30px 10px;
    background: transparent;
    background-image: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Hide Desktop Absolute SVG Layer on Mobile */
  .skills-ecosystem__svg-layer {
    display: none;
  }

  .skills-ecosystem__nodes-layer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  /* Center Card at Top */
  .eco-center-card {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 10px auto;
  }

  /* Vertical Connector Arrow to Stack */
  .eco-mobile-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #64748b;
    margin: -6px 0 4px 0;
  }

  .eco-mobile-connector svg {
    width: 18px;
    height: 18px;
    stroke: #94a3b8;
  }

  .eco-mobile-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin: 12px 0 4px 0;
  }

  .eco-mobile-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
  }

  /* Left Cards stacked vertically */
  .eco-left-card {
    position: relative;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  /* Right Nodes stacked below */
  .eco-right-node {
    position: relative;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (min-width: 901px) {
  .eco-mobile-connector,
  .eco-mobile-section-header {
    display: none !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY: Respect prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .skills-ecosystem,
  .eco-center-card,
  .eco-left-card,
  .eco-right-node,
  .eco-status-dot {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  .skills-ecosystem animateMotion,
  .skills-ecosystem animate {
    display: none !important;
  }
}

