/* ═══════════════════════════════════════
   ECOSYSTEM.CSS — HMC GROUP
═══════════════════════════════════════ */

/* ══════════════════════════════════════
   SECTION 1 — ECO HEADER
══════════════════════════════════════ */
.page-header {
  margin-top: 88px;
  height: 280px;
  background: var(--gradient-navy);
  display: flex;
  align-items: center;
  padding: 0 80px;
  position: relative;
  overflow: hidden;
}

.page-header-content {
  position: relative;
  z-index: 3;
  animation: fadeUp 0.9s ease both;
}

.page-header-h1 {
  font-size: 46px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.2;
}

.page-header-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  line-height: 1.7;
}

.eco-header-visual {
  position: absolute;
  right: 120px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  pointer-events: none;
}

.eco-orbit {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.eco-orbit-1 { width: 100px; height: 100px; border: 1.5px solid rgba(216,160,48,0.4); animation: spinOrbit 8s linear infinite; }
.eco-orbit-2 { width: 170px; height: 170px; border: 1px solid rgba(216,160,48,0.2); animation: spinOrbit 14s linear infinite reverse; }
.eco-orbit-3 { width: 240px; height: 240px; border: 1px solid rgba(64,150,212,0.15); animation: spinOrbit 20s linear infinite; }

.eco-orbit-dot {
  position: absolute;
  border-radius: 50%;
  top: 50%; left: 50%;
}
.eco-dot-1 { width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 10px rgba(216,160,48,0.7); animation: orbitDot 8s linear infinite; --r: 50px; }
.eco-dot-2 { width: 6px; height: 6px; background: var(--blue-sky); box-shadow: 0 0 8px rgba(64,150,212,0.6); animation: orbitDot 14s linear infinite reverse; --r: 85px; }
.eco-dot-3 { width: 5px; height: 5px; background: rgba(255,255,255,0.6); animation: orbitDot 20s linear infinite; --r: 120px; }

@keyframes spinOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes orbitDot {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(var(--r)); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(var(--r)); }
}

/* ══════════════════════════════════════
   SECTION 2 — NUMBERED GRID
══════════════════════════════════════ */
.eco-grid-section {
  padding: 100px 80px;
  background: var(--white);
}

.eco-grid-header {
  max-width: 860px;
  margin: 0 auto 72px;
  text-align: center;
}

.eco-grid-header .section-sub { margin-bottom: 0; margin-left: auto; margin-right: auto; max-width: 100%; }

/* Grid */
.eco-num-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Card base */
.num-card {
  background: var(--white);
  padding: 40px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: default;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, transform 0.3s ease;
}

.num-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.num-card:hover::after { transform: scaleX(1); }
.num-card:hover { background: var(--off-white); transform: translateY(-3px); z-index: 1; }

.num-card-dark { background: var(--off-white); }
.num-card-dark:hover { background: #eceef4; }

.num-card-gold {
  background: var(--navy);
}
.num-card-gold .num-card-number { color: var(--gold); }
.num-card-gold .num-card-name   { color: var(--white); }
.num-card-gold:hover { background: var(--navy-royal); }
.num-card-gold::after { background: var(--gold-light); }

.num-card-number {
  font-size: 36px;
  font-weight: 700;
  color: rgba(8, 40, 120, 0.12);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.num-card:hover .num-card-number { color: var(--gold); }
.num-card-gold:hover .num-card-number { color: var(--gold-light); }

.num-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  transition: color 0.3s ease;
}

/* ══════════════════════════════════════
   SECTION 3 — ECOSYSTEM JOURNEY
══════════════════════════════════════ */
.eco-journey-section {
  padding: 100px 80px;
  background: var(--navy-deep);
  position: relative;
  overflow: hidden;
}

.eco-journey-section::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 80px solid rgba(216,160,48,0.04);
  pointer-events: none;
}

.eco-journey-section::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -150px;
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 60px solid rgba(64,150,212,0.05);
  pointer-events: none;
}

.eco-journey-wrapper { position: relative; z-index: 1; }

.eco-journey-header {
  margin-bottom: 64px;
  text-align: center;
}

.eco-journey-header .eyebrow { color: var(--gold-light); }

.eco-journey-header .section-h2 { color: var(--white); }

/* Flow container */
.journey-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.flow-item {
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.flow-item.visible { opacity: 0.4; transform: translateY(0); }
.flow-item.active  { opacity: 1; transform: translateY(0); }

.flow-box {
  padding: 14px 22px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
  transition: border-color 0.4s ease, color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.flow-item.active .flow-box {
  border-color: var(--gold);
  color: var(--white);
  background: rgba(216,160,48,0.08);
  box-shadow: 0 0 20px rgba(216,160,48,0.15);
}

.flow-box-accent {
  border-color: rgba(64,150,212,0.3);
}

.flow-item.active .flow-box-accent {
  border-color: var(--blue-sky);
  background: rgba(64,150,212,0.08);
  box-shadow: 0 0 20px rgba(64,150,212,0.15);
}

.flow-box-final {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}

.flow-item.active .flow-box-final {
  box-shadow: 0 0 32px rgba(216,160,48,0.4);
}

/* Arrow */
.flow-arrow {
  width: 48px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.2);
  transition: color 0.4s ease;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.flow-arrow svg { width: 100%; height: auto; }
.flow-item.active .flow-arrow { color: var(--gold); }

/* Flow rows layout */
.journey-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
}

.journey-row-1 { position: relative; }
.journey-row-2 { }

/* Down arrow between rows */
.flow-arrow-down {
  width: 16px;
  height: 40px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.2);
  transition: color 0.4s ease;
  display: flex;
  align-items: center;
  margin-left: 16px;
}

.flow-arrow-down svg { width: 100%; height: 100%; }
.flow-arrow-down.visible { color: var(--gold); }

/* Leading arrow at start of row 2 */
.flow-arrow-start {
  width: 48px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.2);
  transition: color 0.5s ease;
  display: flex;
  align-items: center;
  padding: 0 4px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.4s ease;
}

.flow-arrow-start svg { width: 100%; height: auto; }
.flow-arrow-start.visible { opacity: 0.4; transform: translateY(0); }
.flow-arrow-start.active  { opacity: 1; transform: translateY(0); color: var(--gold); }

/* ══════════════════════════════════════
   SECTION 4 — HEALTHCARE SECTORS TIMELINE
══════════════════════════════════════ */
.eco-sectors-section {
  padding: 100px 80px;
  background: var(--off-white);
  position: relative;
  overflow: hidden;
}

/* Decorative circles */
.eco-sectors-section::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 90px solid rgba(8,40,120,0.05);
  pointer-events: none;
}

.eco-sectors-section::after {
  content: '';
  position: absolute;
  bottom: -150px; right: -150px;
  width: 480px; height: 480px;
  border-radius: 50%;
  border: 70px solid rgba(216,160,48,0.06);
  pointer-events: none;
}

.eco-sectors-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.eco-sectors-header {
  text-align: center;
  margin-bottom: 80px;
}

/* Timeline */
.sectors-timeline {
  position: relative;
  padding-bottom: 0;
}

.sectors-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
  overflow: hidden;
}

.sectors-line::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: calc(100% - var(--progress, 0) * 100%);
  background: linear-gradient(180deg, var(--gold) 0%, var(--blue-sky) 100%);
  transition: bottom 0.1s linear;
}

/* Step */
.sector-step {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 28px 0;
  position: relative;
}

.sector-left  { flex-direction: row; padding-right: calc(50% + 56px); }
.sector-right { flex-direction: row-reverse; padding-left: calc(50% + 56px); }

.sector-left  .sector-content { text-align: right; }
.sector-right .sector-content { text-align: left; }


/* Node */
.sector-node {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
  flex-shrink: 0;
  color: rgba(255,255,255,0.6);
}

.sector-node svg {
  width: 26px; height: 26px;
  stroke: rgba(255,255,255,0.9);
  fill: none;
  transition: stroke 0.4s ease;
}

.sector-step.visible .sector-node {
  border-color: var(--gold);
  background: var(--navy);
  box-shadow: 0 0 0 6px rgba(216,160,48,0.12);
}

.sector-step.visible .sector-node { color: var(--white); }
.sector-step.visible .sector-node svg { stroke: var(--white); }

/* Content */
.sector-content { flex: 1; }

.sector-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.sector-content p {
  font-size: 13px;
  color: var(--charcoal);
  line-height: 1.7;
  max-width: 340px;
}

.sector-left  .sector-content p { margin-left: auto; }
.sector-right .sector-content p { margin-right: auto; }

/* Extra decorative circles */
.eco-sectors-section .sectors-circle-1 {
  position: absolute;
  top: 30%; right: -100px;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 50px solid rgba(8,40,120,0.03);
  pointer-events: none;
  z-index: 0;
}

.eco-sectors-section .sectors-circle-2 {
  position: absolute;
  top: 60%; left: -80px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 40px solid rgba(216,160,48,0.04);
  pointer-events: none;
  z-index: 0;
}

/* Ecosystem header visual overlay */
.eco-header-visual {
  position: absolute;
  right: 120px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  pointer-events: none;
  z-index: 2;
}

/* ── IMAGE REPLACEMENTS ── */
.page-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,32,88,0.72) 0%, rgba(8,40,120,0.45) 100%);
  z-index: 1;
}

.page-header-content {
  position: relative;
  z-index: 3;
}

/* ── SECTOR NODE ICON IMAGES ── */
.sector-node img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

/* ── Flow Item Override ── */
.flow-item {
  opacity: 0 !important;
  transform: translateY(16px) !important;
}

.flow-item.visible {
  opacity: 0.4 !important;
  transform: translateY(0) !important;
}

.flow-item.active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}