/* ==========================================================================
   Project Approach Section ("رویکرد ما در هر پروژه")
   5-Step Sequential Animated Process Section
   ========================================================================== */

/* ==== FONTS ==== */
@font-face {
  font-family: Koodak;
  src: url(/static/Font/B_Koodak.ttf);
}

/* ==== end FONTS ==== */

.project-approach-section {
  background-color: #030b18;
  padding: 60px 24px 70px 24px;
  direction: rtl;
  font-family: iranyekan, system-ui, -apple-system, sans-serif;
  overflow: hidden;
  position: relative;
}

.project-approach-container {
  max-width: 1320px;
  margin: 0 auto;
  text-align: center;
}

/* Section Title */
.project-approach-title {
  font-size: 2rem;
  font-weight: 900;
  color: #7ec8e3;
  margin: 0 0 50px 0;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  font-family: 'Koodak', 'Sahel', sans-serif;
}

/* Timeline Flex Wrapper */
.approach-steps-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding-top: 25px;
  /* space for top circles */
  gap: 0;
  direction: ltr;
}

/* Connectors (Arrow lines between steps) */
.step-connector {
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #f59e0b;
  opacity: 0;
  transform: translateX(-15px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  overflow: visible;
}

.connector-start {
  flex: 0 0 24px;
}

.connector-end {
  flex: 0 0 24px;
}

.connector-line {
  display: none;
}

.connector-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: #f59e0b;
  z-index: 3;
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.25));
}

/* Step Cards */
.approach-step-card {
  flex: 1 1 0px;
  background-color: #041021;
  border: 1px solid #133c67;
  border-radius: 2px;
  padding: 35px 16px 24px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  z-index: 2;
}

.approach-step-card:hover {
  border-color: #2b70b8;
  box-shadow: 0 8px 24px rgba(19, 60, 103, 0.35);
  transform: translateY(-4px);
}

/* Step Circle Badge at Top Center */
.step-circle {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #05142a;
  border: 1.5px solid #1a4a7d;
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: 'Koodak', 'Sahel', sans-serif;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Icon Box & SVG */
.step-icon-box {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-svg-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Step Content */
.step-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.4;
  font-family: 'Koodak', 'Sahel', sans-serif;
}

.step-description {
  font-size: 0.85rem;
  color: #ffffff;
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
}

/* ==========================================================================
   Sequential Scroll Animation Rules (Triggered when section has .in-view)
   ========================================================================== */

/* Step 1 Animation */
.project-approach-section.in-view .step-anim-1.step-connector {
  transition-delay: 0.1s;
  opacity: 1;
  transform: translateX(0);
}

.project-approach-section.in-view .step-anim-1 .connector-line {
  transition-delay: 0.15s;
  transform: translateY(-50%) scaleX(1);
}

.project-approach-section.in-view .step-anim-1 .connector-arrow {
  transition-delay: 0.35s;
  transform: translate(-50%, -50%) scale(1);
}

.project-approach-section.in-view .step-anim-1.approach-step-card {
  transition-delay: 0.4s;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-approach-section.in-view .step-anim-1 .step-circle {
  transition-delay: 0.55s;
  transform: translateX(-50%) scale(1);
}

/* Step 2 Animation */
.project-approach-section.in-view .step-anim-2.step-connector {
  transition-delay: 0.8s;
  opacity: 1;
  transform: translateX(0);
}

.project-approach-section.in-view .step-anim-2 .connector-line {
  transition-delay: 0.85s;
  transform: translateY(-50%) scaleX(1);
}

.project-approach-section.in-view .step-anim-2 .connector-arrow {
  transition-delay: 1.05s;
  transform: translate(-50%, -50%) scale(1);
}

.project-approach-section.in-view .step-anim-2.approach-step-card {
  transition-delay: 1.1s;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-approach-section.in-view .step-anim-2 .step-circle {
  transition-delay: 1.25s;
  transform: translateX(-50%) scale(1);
}

/* Step 3 Animation */
.project-approach-section.in-view .step-anim-3.step-connector {
  transition-delay: 1.5s;
  opacity: 1;
  transform: translateX(0);
}

.project-approach-section.in-view .step-anim-3 .connector-line {
  transition-delay: 1.55s;
  transform: translateY(-50%) scaleX(1);
}

.project-approach-section.in-view .step-anim-3 .connector-arrow {
  transition-delay: 1.75s;
  transform: translate(-50%, -50%) scale(1);
}

.project-approach-section.in-view .step-anim-3.approach-step-card {
  transition-delay: 1.8s;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-approach-section.in-view .step-anim-3 .step-circle {
  transition-delay: 1.95s;
  transform: translateX(-50%) scale(1);
}

/* Step 4 Animation */
.project-approach-section.in-view .step-anim-4.step-connector {
  transition-delay: 2.2s;
  opacity: 1;
  transform: translateX(0);
}

.project-approach-section.in-view .step-anim-4 .connector-line {
  transition-delay: 2.25s;
  transform: translateY(-50%) scaleX(1);
}

.project-approach-section.in-view .step-anim-4 .connector-arrow {
  transition-delay: 2.45s;
  transform: translate(-50%, -50%) scale(1);
}

.project-approach-section.in-view .step-anim-4.approach-step-card {
  transition-delay: 2.5s;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-approach-section.in-view .step-anim-4 .step-circle {
  transition-delay: 2.65s;
  transform: translateX(-50%) scale(1);
}

/* Step 5 Animation */
.project-approach-section.in-view .step-anim-5.step-connector {
  transition-delay: 2.9s;
  opacity: 1;
  transform: translateX(0);
}

.project-approach-section.in-view .step-anim-5 .connector-line {
  transition-delay: 2.95s;
  transform: translateY(-50%) scaleX(1);
}

.project-approach-section.in-view .step-anim-5 .connector-arrow {
  transition-delay: 3.15s;
  transform: translate(-50%, -50%) scale(1);
}

.project-approach-section.in-view .step-anim-5.approach-step-card {
  transition-delay: 3.2s;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-approach-section.in-view .step-anim-5 .step-circle {
  transition-delay: 3.35s;
  transform: translateX(-50%) scale(1);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 1024px) {
  .approach-steps-wrapper {
    flex-wrap: wrap;
    gap: 28px 16px;
    justify-content: center;
  }

  .step-connector {
    display: none;
    /* simplified view for tablets */
  }

  .approach-step-card {
    flex: 0 0 calc(33.333% - 16px);
    margin-bottom: 15px;
  }
}

@media (max-width: 768px) {
  .approach-step-card {
    flex: 0 0 calc(50% - 16px);
  }
}

@media (max-width: 520px) {
  .approach-step-card {
    flex: 0 0 100%;
  }

  .project-approach-title {
    font-size: 1.6rem;
  }
}