/* ════════════════════════════════════════
   Ecosystem Section — Ink Splash Hover
   ════════════════════════════════════════ */

.ecosystem {
  position: relative;
  width: 100%;
  padding: 120px 0 100px;
  background: #F8FAFC;
  overflow: hidden;
}

.ecosystem::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(5, 41, 94, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 41, 94, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.ecosystem::after {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(13, 86, 169, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.eco-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

.eco-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
}

.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 50px;
  background: rgba(13, 86, 169, 0.06);
  border: 1px solid rgba(13, 86, 169, 0.12);
  font-size: 12px;
  font-weight: 700;
  color: #0D56A9;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 28px;
}

.eco-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #B89857;
  box-shadow: 0 0 8px rgba(184, 152, 87, 0.5);
  animation: badgeDotPulse 2s ease-in-out infinite;
}

@keyframes badgeDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.eco-header h2 {
  font-size: 48px;
  font-weight: 800;
  color: #05295E;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.eco-header h2 span {
  background: linear-gradient(135deg, #0D56A9, #B89857);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eco-header p {
  font-size: 17px;
  color: #5F6B7A;
  line-height: 1.8;
}

.eco-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ════════════════════════════════════════
   Card — Base (No Hover)
   ════════════════════════════════════════ */

.eco-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 24px;
  padding: 32px 22px 28px;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.6s ease;
}

/* ── Ink Fill ── */
.eco-card .ink-fill {
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #0D56A9, #072d5e);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
  pointer-events: none;
}

/* ── Hover — Ink Splash Only ── */
.eco-card:hover {
  border-color: rgba(13, 86, 169, 0.25);
}

.eco-card:hover .ink-fill {
  height: 180%;
  width: 180%;
  border-radius: 42%;
}

/* ── Icon ── */
.eco-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.eco-card-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  transition: filter 0.6s ease;
}

/* .eco-card:hover .eco-card-icon {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
} */

/* .eco-card:hover .eco-card-icon img {
  filter: brightness(0) invert(1);
} */

/* ── Text ── */
.eco-card-body {
  position: relative;
  z-index: 3;
}

.eco-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #05295E;
  margin-bottom: 10px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  transition: color 0.6s ease;
}

.eco-card-body p {
  font-size: 13px;
  color: #8A94A6;
  line-height: 1.7;
  transition: color 0.6s ease;
}

.eco-card:hover .eco-card-body h3 {
  color: #FFFFFF;
}

.eco-card:hover .eco-card-body p {
  color: rgba(255, 255, 255, 0.78);
}

/* ════════════════════════════════════════
   Light Mode — Base Only
   ════════════════════════════════════════ */

body.light .ecosystem {
  background: #F8FAFC;
}

body.light .eco-card {
  background: linear-gradient(165deg, #FFFFFF 0%, #F8FAFC 100%);
  border-color: rgba(5, 41, 94, 0.06);
}

body.light .eco-card-icon {
  background: linear-gradient(145deg, rgba(13, 86, 169, 0.06) 0%, rgba(184, 152, 87, 0.03) 100%);
  border-color: rgba(13, 86, 169, 0.08);
}

/* ════════════════════════════════════════
   Responsive
   ════════════════════════════════════════ */

@media (max-width: 1024px) {
  .eco-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .eco-card { padding: 28px 20px 24px; }
  .eco-header h2 { font-size: 40px; }
  .eco-wrapper { padding: 0 30px; }
}

@media (max-width: 768px) {
  .ecosystem { padding: 80px 0 60px; }
  .eco-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .eco-header { margin-bottom: 48px; }
  .eco-header h2 { font-size: 32px; letter-spacing: -1px; }
  .eco-header p { font-size: 15px; }
  .eco-card { padding: 24px 18px 20px; border-radius: 14px; }
  .eco-card-icon { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 18px; }
  .eco-card-icon img { width: 26px; height: 26px; }
  .eco-card-body h3 { font-size: 14px; margin-bottom: 8px; }
  .eco-card-body p { font-size: 12px; line-height: 1.65; }
  .eco-wrapper { padding: 0 20px; }
}

@media (max-width: 480px) {
  .ecosystem { padding: 60px 0 40px; }
  .eco-grid { grid-template-columns: 1fr; gap: 12px; }
  .eco-header h2 { font-size: 26px; letter-spacing: -0.5px; }
  .eco-header p { font-size: 14px; line-height: 1.7; }
  .eco-badge { font-size: 10px; padding: 8px 16px; gap: 8px; }
  .eco-card {
    padding: 22px 18px 18px;
    border-radius: 14px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }
  .eco-card-icon { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 0; flex-shrink: 0; }
  .eco-card-icon img { width: 24px; height: 24px; }
  .eco-card-body h3 { font-size: 14px; margin-bottom: 4px; }
  .eco-card-body p { font-size: 12px; line-height: 1.6; }
  .eco-wrapper { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .eco-card,
  .eco-card-icon,
  .eco-card-icon img,
  .eco-card-body h3,
  .eco-card-body p,
  .ink-fill {
    transition: none !important;
  }
}