/* === 1. FLOATING GLASS IN-PAGE SUB-NAV BAR (MATCHES HEADER 1:1) === */
.idynic-subnav-sticky-wrapper {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
  padding: 0 20px;
  box-sizing: border-box;
  background: transparent !important;
  pointer-events: none;
  transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When scrolling down: subnav smoothly glides to top position (14px) */
body.header-hidden-mode .idynic-subnav-sticky-wrapper {
  top: 14px;
}

/* Pill container matching .idynic-glass-navbar identically */
.idynic-subnav-container {
  max-width: 1380px;
  margin: 0 auto;
  background: rgba(226, 234, 245, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 10, 30, 0.08), 0 0 1px rgba(255, 255, 255, 0.8) inset;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.idynic-subnav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}
.idynic-subnav-menu::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.idynic-subnav-item {
  display: inline-flex;
}

.idynic-subnav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.idynic-subnav-link:hover {
  color: #0284c7;
  background: rgba(255, 255, 255, 0.45);
}

/* Active Pill State */
.idynic-subnav-link.active,
.idynic-subnav-item.active .idynic-subnav-link {
  color: #3730a3 !important;
  background: linear-gradient(135deg, rgba(220, 214, 251, 0.85), rgba(238, 235, 254, 0.95)) !important;
  border: 1px solid rgba(165, 150, 247, 0.5) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.idynic-subnav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.idynic-subnav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.idynic-subnav-cta-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  color: #ffffff;
  transform: translateY(-1px);
}

/* === 2. SCROLL-DRIVEN STACKING ECOSYSTEM CARDS SECTION === */
.idynic-ecosystem-scroll-section {
  position: relative;
  padding: 100px 0 140px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 40%, #f1f5f9 80%, #ffffff 100%);
  color: #0f172a;
  overflow: visible; /* Must be visible for sticky mechanics */
}

/* Ambient Radial Glows (Soft modern lighting) */
.idynic-ecosystem-scroll-section::before {
  content: '';
  position: absolute;
  top: 5%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.idynic-ecosystem-scroll-section::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.idynic-ecosystem-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 70px;
  position: relative;
  z-index: 2;
}

.idynic-eco-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 24px;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.idynic-eco-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 8px #0ea5e9;
}

.idynic-ecosystem-title {
  font-size: 44px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 18px;
}

.idynic-ecosystem-title span {
  background: linear-gradient(135deg, #4f46e5 0%, #0284c7 60%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.idynic-ecosystem-desc {
  font-size: 17.5px;
  color: #475569;
  line-height: 1.65;
  margin: 0 auto;
}

/* 2-Column Split Layout */
.idynic-eco-split-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start; /* CRITICAL: Enables left rail to stay sticky while right cards stack */
  position: relative;
  z-index: 2;
}

/* Left Sticky Navigation Rail (STABLE throughout scrolling) */
.idynic-eco-rail {
  position: sticky;
  top: 140px;
  align-self: start;
  height: fit-content;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 26px 20px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(226, 232, 240, 0.6);
  z-index: 30;
  transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1), all 0.3s ease;
}

/* When header is hidden, rail shifts up to 85px */
body.header-hidden-mode .idynic-eco-rail {
  top: 85px;
}

.idynic-rail-title {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.idynic-rail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idynic-rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #475569;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.idynic-rail-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.idynic-rail-item:hover {
  color: #1e293b;
  background: #f8fafc;
}

.idynic-rail-item.active {
  color: #3730a3;
  background: linear-gradient(135deg, rgba(220, 214, 251, 0.6), rgba(238, 235, 254, 0.85));
  border-color: rgba(165, 150, 247, 0.4);
  font-weight: 600;
}

.idynic-rail-item.active .idynic-rail-step {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

/* Right Content: Stacking Cards Flow */
.idynic-eco-cards-flow {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Individual Card Stacking Orders and Offsets */
.idynic-eco-pillar-card:nth-child(1) { --card-index: 0; z-index: 2; }
.idynic-eco-pillar-card:nth-child(2) { --card-index: 1; z-index: 3; }
.idynic-eco-pillar-card:nth-child(3) { --card-index: 2; z-index: 4; }
.idynic-eco-pillar-card:nth-child(4) { --card-index: 3; z-index: 5; }
.idynic-eco-pillar-card:nth-child(5) { --card-index: 4; z-index: 6; }

/* The White Stacking Card */
.idynic-eco-pillar-card {
  position: sticky;
  top: calc(140px + (var(--card-index, 0) * 20px));
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 38px 40px;
  margin-bottom: 110px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 25px 50px -10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.6);
  transform-origin: center top;
  transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, filter 0.25s ease;
  overflow: hidden;
}

/* When header is hidden, cards shift up to calc(85px + offset) */
body.header-hidden-mode .idynic-eco-pillar-card {
  top: calc(85px + (var(--card-index, 0) * 20px));
}

.idynic-eco-pillar-card:last-child {
  margin-bottom: 0;
}

/* Subtle depth effect when covered by next card */
.idynic-eco-pillar-card.is-stacked {
  transform: scale(0.985);
  filter: brightness(0.98);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
}

/* Glowing Top Accent Bar */
.idynic-eco-pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #0ea5e9, #8b5cf6);
}

.idynic-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.idynic-card-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #4f46e5;
}

.idynic-card-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  color: #059669;
  font-size: 12.5px;
  font-weight: 600;
}

.idynic-card-heading {
  font-size: 27px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 12px;
}

.idynic-card-subheading {
  font-size: 15.5px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 26px;
}

/* Points List */
.idynic-points-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.idynic-point-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.idynic-point-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateX(4px);
}

.idynic-point-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 2px;
}

.idynic-point-content h4 {
  font-size: 15.5px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px;
}

.idynic-point-content p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Partner Logo Chips Grid */
.idynic-partner-chips-section {
  border-top: 1px solid #f1f5f9;
  padding-top: 22px;
}

.idynic-partner-chips-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 12px;
}

.idynic-partner-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.idynic-partner-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.idynic-partner-chip:hover {
  background: #ffffff;
  border-color: #6366f1;
  color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.idynic-partner-chip span.chip-logo {
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* High-contrast brand logo accents */
.chip-aws span.chip-logo { color: #d97706; }
.chip-azure span.chip-logo { color: #0284c7; }
.chip-gcp span.chip-logo { color: #2563eb; }
.chip-nvidia span.chip-logo { color: #16a34a; }
.chip-amd span.chip-logo { color: #dc2626; }
.chip-cisco span.chip-logo { color: #0284c7; }
.chip-intel span.chip-logo { color: #0284c7; }
.chip-snowflake span.chip-logo { color: #0284c7; }
.chip-databricks span.chip-logo { color: #ea580c; }
.chip-sap span.chip-logo { color: #0284c7; }
.chip-salesforce span.chip-logo { color: #0284c7; }
.chip-servicenow span.chip-logo { color: #059669; }
.chip-crowdstrike span.chip-logo { color: #dc2626; }

/* === RESPONSIVE STYLES === */
@media (max-width: 1024px) {
  .idynic-eco-split-wrap {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .idynic-eco-rail {
    position: sticky;
    top: 135px;
    z-index: 25;
    margin-bottom: 20px;
  }
  body.header-hidden-mode .idynic-eco-rail {
    top: 80px;
  }
  .idynic-rail-list {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .idynic-rail-list::-webkit-scrollbar {
    display: none;
  }
  .idynic-subnav-container {
    padding: 6px 16px;
  }
}

@media (max-width: 767px) {
  .idynic-subnav-sticky-wrapper {
    top: 70px;
  }
  body.header-hidden-mode .idynic-subnav-sticky-wrapper {
    top: 10px;
  }
  .idynic-subnav-cta {
    display: none;
  }
  .idynic-subnav-link {
    padding: 6px 12px;
    font-size: 13px;
  }
  .idynic-ecosystem-title {
    font-size: 32px;
  }
  .idynic-eco-pillar-card {
    padding: 24px 20px;
    margin-bottom: 60px;
    top: calc(125px + (var(--card-index, 0) * 14px));
  }
  body.header-hidden-mode .idynic-eco-pillar-card {
    top: calc(75px + (var(--card-index, 0) * 14px));
  }
  .idynic-card-heading {
    font-size: 22px;
  }
  .idynic-point-item {
    padding: 12px 14px;
  }
}
