/* ==========================================================================
   Startseite Ecosystem – Static Diagram (Hexagonal 6-Group Layout)
   ========================================================================== */

/* ==========================================================================
   1. SECTION WRAPPER & TRANSITION
   ========================================================================== */

/* Allow ecosystem to break out of .cl-hero */
.cl-hero:has(.cl-eco-section) {
  overflow: visible;
}

.cl-eco-section {
  position: relative;
  padding: 56px 0 48px;
  /* Break out of .cl-hero flex container to full viewport width */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  align-self: stretch;
  /* Soft fade transition – blends into hero gradient at top/bottom */
  background:
    radial-gradient(ellipse 60% 35% at 50% 50%,
      rgba(190,165,100,0.05) 0%,
      transparent 70%),
    linear-gradient(to bottom,
      transparent 0%,
      rgba(250,250,248,0.8) 8%,
      rgba(250,250,248,0.95) 18%,
      #FAFAF8 30%,
      #FAFAF8 70%,
      rgba(250,250,248,0.95) 82%,
      rgba(250,250,248,0.8) 92%,
      transparent 100%
    );
}

.cl-eco-wrap {
  width: min(94%, 1100px);
  margin: 0 auto;
}

/* ==========================================================================
   2. DESKTOP DIAGRAM
   ========================================================================== */
.cl-eco-diagram {
  position: relative;
  width: 100%;
  max-width: 880px;
  aspect-ratio: 10 / 6;
  margin: 0 auto;
}

/* SVG connection lines */
.cl-eco-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cl-eco-lines line {
  stroke: #bea564;
  stroke-width: 1.2;
  opacity: 0.18;
  stroke-linecap: round;
}

/* ==========================================================================
   3. CENTER HUB
   ========================================================================== */
.cl-eco-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.cl-eco-core {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #2D2D2D;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  box-shadow:
    0 0 0 8px rgba(45, 45, 45, 0.07),
    0 0 0 18px rgba(45, 45, 45, 0.03),
    0 6px 24px rgba(0, 0, 0, 0.10);
}

.cl-eco-core span {
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #FAFAF8;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* Pulsing rings */
.cl-eco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(190, 165, 100, 0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cl-eco-ring--1 {
  width: 136px;
  height: 136px;
  animation: cl-ring-pulse 4s ease infinite;
}

.cl-eco-ring--2 {
  width: 170px;
  height: 170px;
  animation: cl-ring-pulse 4s ease infinite 1s;
}

@keyframes cl-ring-pulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.12; transform: translate(-50%, -50%) scale(1.06); }
}

/* ==========================================================================
   4. GROUP BOXES (hexagonal arrangement with pill tags)
   ========================================================================== */
.cl-eco-group {
  position: absolute;
  left: var(--gx);
  top: var(--gy);
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: 1.5px dashed rgba(190, 165, 100, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  max-width: 260px;
}

.cl-eco-group:hover {
  border-color: rgba(190, 165, 100, 0.45);
  box-shadow: 0 4px 24px rgba(190, 165, 100, 0.08);
}

.cl-eco-group-label {
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #2D2D2D;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Pill tags inside groups */
.cl-eco-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.cl-eco-pill {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(190, 165, 100, 0.18);
  border-radius: 100px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: #a89350;
  white-space: nowrap;
  line-height: 1.3;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cl-eco-pill:hover {
  background: rgba(190, 165, 100, 0.12);
  border-color: rgba(190, 165, 100, 0.4);
  color: #8a7640;
}

/* ==========================================================================
   5. MOBILE LAYOUT
   ========================================================================== */
.cl-eco-mobile {
  display: none;
}

/* ==========================================================================
   6. RESPONSIVE
   ========================================================================== */
@media (max-width: 960px) {
  .cl-eco-core { width: 88px; height: 88px; }
  .cl-eco-core span { font-size: 11px; }
  .cl-eco-ring--1 { width: 120px; height: 120px; }
  .cl-eco-ring--2 { width: 150px; height: 150px; }
  .cl-eco-group { padding: 12px 14px; gap: 6px; max-width: 220px; }
  .cl-eco-group-label { font-size: 11px; }
  .cl-eco-pill { font-size: 9.5px; padding: 3px 8px; }
  .cl-eco-pills { gap: 4px; }
}

/* Below 768px: switch to mobile layout */
@media (max-width: 768px) {
  .cl-eco-section {
    padding: 48px 0 40px;
    background:
      linear-gradient(to bottom,
        transparent 0%,
        rgba(250,250,248,0.9) 10%,
        #FAFAF8 25%,
        #FAFAF8 75%,
        rgba(250,250,248,0.9) 90%,
        transparent 100%
      );
  }

  .cl-eco-diagram { display: none; }
  .cl-eco-mobile  { display: block; text-align: center; }

  /* Hub */
  .cl-eco-mobile-hub {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2D2D2D;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
      0 0 0 7px rgba(45, 45, 45, 0.07),
      0 0 0 16px rgba(45, 45, 45, 0.03);
    margin-bottom: 28px;
  }

  .cl-eco-mobile-hub span {
    font-family: "Montserrat", "Inter", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #FAFAF8;
    text-align: center;
    line-height: 1.3;
  }

  /* Group cards stacked */
  .cl-eco-mobile-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    margin: 0 auto;
  }

  .cl-eco-mobile-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }

  .cl-eco-mobile-card h4 {
    font-family: "Montserrat", "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #2D2D2D;
    margin: 0;
    line-height: 1.3;
    flex-shrink: 0;
    width: 95px;
  }

  .cl-eco-mobile-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
  }

  .cl-eco-mobile-nodes span {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 100px;
    border: 1px solid rgba(190, 165, 100, 0.15);
    background: rgba(250, 250, 248, 0.9);
    font-family: "Inter", -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #a89350;
    line-height: 1.3;
  }
}
