/* ==========================================================================
   AGILE DELIVERY FRAMEWORK (HYBRID PARALLAX SCROLLER)
   Futuristic, full-screen viewport layout with horizontal card slide on Desktop & Mobile
   ========================================================================== */

.agile-framework-section {
  position: relative;
  width: 100%;
  height: 280vh; /* Premium scrolling depth */
  background: #f8fafc;
  overflow: visible;
  z-index: 1;
}

/* Ambient background glows */
.af-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.35;
  z-index: -1;
}

.af-bg-glow.glow-blue {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.15) 0%, transparent 70%);
  left: -10%;
  top: 10%;
}

.af-bg-glow.glow-pink {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(239, 49, 57, 0.08) 0%, transparent 70%);
  right: -10%;
  bottom: 10%;
}

/* Sticky viewport frame */
.af-sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6vh 0;
  box-sizing: border-box;
}

.af-content-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* Compact Top Header styling */
.af-top-header {
  flex-shrink: 0;
  margin-bottom: 2vh;
}

.af-process-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(2, 45, 98, 0.04);
  color: #022d62;
  border: 1px solid rgba(2, 45, 98, 0.08);
  border-radius: 30px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.af-main-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #022d62;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.af-main-title span.text-danger {
  color: #ef3139 !important;
}

.af-main-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #5a6e85;
  max-width: 720px;
}

/* Compact Feature bullet grid */
.af-features-grid {
  margin-top: 10px;
}

.af-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(2, 45, 98, 0.05);
  box-shadow: 0 4px 15px rgba(2, 45, 98, 0.02);
  height: 100%;
  transition: all 0.3s ease;
}

.af-feature-item:hover {
  border-color: rgba(239, 49, 57, 0.12);
  box-shadow: 0 8px 25px rgba(239, 49, 57, 0.04);
  transform: translateY(-2px);
}

.af-feature-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 45, 98, 0.03);
  border-radius: 8px;
  flex-shrink: 0;
}

.af-feature-title {
  font-size: 13px;
  font-weight: 700;
  color: #022d62;
}

.af-feature-desc {
  font-size: 11px;
  color: #718096;
  display: block;
}

/* Float Animation for right image - SCALED UP */
.af-illustration-wrapper {
  position: relative;
  display: inline-block;
}

.af-process-img {
  max-height: 250px; /* Bada image */
  width: auto;
  filter: drop-shadow(0 15px 35px rgba(2, 45, 98, 0.1));
  animation: floatIllustration 5s ease-in-out infinite;
}

@keyframes floatIllustration {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* Track Area holding the sliding cards - FULL SCREEN WIDTH */
.af-track-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  width: 100%; /* Take 100% of parent which is full viewport width */
  overflow: hidden;
  position: relative;
  margin: 3vh 0;
}

.af-horizontal-track {
  display: flex;
  align-items: stretch;
  will-change: transform;
  transition: transform 0.1s cubic-bezier(0.25, 1, 0.5, 1);
  /* Paddings are calculated dynamically in Javascript for pixel perfection */
}

.af-track-card {
  flex: 0 0 400px;
  width: 400px;
}

/* New White-themed interactive card layout */
.af-card {
  background: #ffffff;
  border: 1px solid rgba(2, 45, 98, 0.06);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(2, 45, 98, 0.02);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}

.af-card-num {
  font-size: 14px;
  font-weight: 700;
  color: #a0aec0;
  margin-bottom: 12px;
  display: block;
}

.af-card-title {
  font-size: 18px;
  font-weight: 800;
  color: #022d62;
  margin-bottom: 12px;
  line-height: 1.3;
}

.af-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #718096;
  margin-bottom: 28px;
}

.af-card-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(2, 45, 98, 0.06);
  background: rgba(2, 45, 98, 0.01);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #022d62;
  margin-top: auto;
  transition: all 0.3s ease;
}

/* Card Connectors */
.af-card-connector {
  flex: 0 0 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 16px;
}

/* Card Active & Hover states */
.af-card.active,
.af-card:hover {
  background: #022d62;
  border-color: #022d62;
  box-shadow: 0 25px 50px rgba(2, 45, 98, 0.18), 0 0 25px rgba(239, 49, 57, 0.08);
  transform: translateY(-6px);
}

.af-card.active .af-card-num,
.af-card:hover .af-card-num {
  color: rgba(255, 255, 255, 0.6);
}

.af-card.active .af-card-title,
.af-card:hover .af-card-title {
  color: #ffffff;
}

.af-card.active .af-card-desc,
.af-card:hover .af-card-desc {
  color: rgba(255, 255, 255, 0.85);
}

.af-card.active .af-card-icon-badge,
.af-card:hover .af-card-icon-badge {
  background: #ef3139;
  border-color: #ef3139;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(239, 49, 57, 0.8);
}

/* Progress tracker bar at the bottom */
.af-tracker-bar {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid rgba(2, 45, 98, 0.05);
  box-shadow: 0 8px 25px rgba(2, 45, 98, 0.03);
  z-index: 2;
  position: relative;
}

.af-tracker-steps {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
}

.af-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.af-step-item.active {
  opacity: 1;
}

.af-step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(2, 45, 98, 0.05);
  color: #022d62;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.af-step-item.active .af-step-dot {
  background: #ef3139;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(239, 49, 57, 0.4);
}

.af-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #022d62;
}

.af-step-item.active .af-step-label {
  color: #ef3139;
}

.af-step-line {
  flex-grow: 1;
  height: 1px;
  background: rgba(2, 45, 98, 0.06);
  max-width: 80px;
}

/* ==========================================================================
   Responsive Adaptations (Always Sticky & Beautiful)
   ========================================================================== */

@media (max-width: 1199px) {
  .af-step-line {
    max-width: 40px;
  }
}

@media (max-width: 991px) {
  .af-sticky-container {
    padding: 2vh 0;
  }

  .af-main-title {
    font-size: 1.6rem;
  }

  .af-main-desc {
    font-size: 12px;
    margin-bottom: 10px !important;
  }

  .af-process-img {
    max-height: 140px; /* Scaled down for mobile view height constraint */
  }

  .af-track-container {
    margin: 2vh 0;
  }

  .af-track-card {
    flex: 0 0 280px;
    width: 280px;
  }

  .af-card {
    padding: 20px 16px;
  }

  .af-card-num {
    margin-bottom: 6px;
  }

  .af-card-title {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .af-card-desc {
    font-size: 11px;
    margin-bottom: 16px;
  }

  .af-card-icon-badge {
    width: 34px;
    height: 34px;
  }

  .af-card-connector {
    flex: 0 0 40px;
    font-size: 12px;
  }

  .af-step-line {
    display: none;
  }

  .af-step-label {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .af-tracker-bar {
    flex-direction: column;
    border-radius: 16px !important;
    gap: 10px;
    padding: 10px !important;
  }
  
  .af-tracker-steps {
    width: 100%;
    justify-content: space-between;
    padding: 0;
  }

  .af-tracker-cta {
    width: 100%;
    text-align: center;
  }

  .af-tracker-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 6px 12px !important;
    font-size: 12px;
  }
}
