/* Etapas Section Styles */

.etapas {
  background-color: #fcfcfc; /* Light background as per image usually */
  padding: 80px 0;
  overflow: hidden;
}

.etapas-title {
  text-align: center;
  font-size: 3.5rem;
  text-transform: uppercase;
  margin-bottom: 60px;
  font-weight: 300;
  color: #333;
}

.etapas-title .accent {
  color: #ac815e; /* Gold color */
  font-weight: 400;
}

.etapas-title .dark {
  color: #222;
  font-weight: 400;
}

/* Timeline Container */
.etapas-timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* Timeline Rows */
.etapas-row {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 80px;
  padding-top: 40px; /* Space for numbers */
}

/* Connector Line */
.etapas-row::before {
  content: '';
  position: absolute;
  top: 3.6rem; /* Aligns with center of number circles (40px height / 2) */
  left: 5%; /* Start slightly in */
  right: 5%; /* End slightly in */
  height: 2px;
  background-color: #444;
  z-index: 0;
}

/* Last row connector might need adjustment or be same */
.etapas-row:last-child {
  margin-bottom: 0;
}

/* Timeline Item */
.etapas-item {
  position: relative;
  width: 23%; /* 4 items per row with gaps */
  z-index: 1;
}

/* Number Circle */
.etapas-number {
  width: 40px;
  height: 40px;
  background-color: #5b5d65; /* Dark grey default */
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  font-size: 1rem;
  margin: 0 auto 30px; /* Center horizontally and push card down */
  position: relative; /* To stack above line */
  z-index: 2;
}

.etapas-item.active .etapas-number {
  background-color: #ac815e; /* Gold for active/last item */
}

/* Card Styling */
.etapas-card {
  background-color: #eaeaea;
  border-radius: 12px;
  padding: 25px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.etapas-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.etapas-item.active .etapas-card {
  background-color: #ac815e; /* Gold background for active */
  color: #fff;
}

/* Card Content */
.etapas-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.etapas-icon {
  font-size: 2rem;
  color: #555;
}

.etapas-item.active .etapas-icon {
  color: #fff;
}

.etapas-check {
  width: 24px;
  height: 24px;
  background-color: #555;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
}

.etapas-item.active .etapas-check {
  background-color: #fff;
  color: #ac815e;
}

.etapas-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: block;
}

.etapas-item.active .etapas-status {
  color: rgba(255,255,255,0.7);
}

.etapas-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

.etapas-item.active .etapas-name {
  color: #fff;
}

/* Responsive */
@media (max-width: 991px) {
  .etapas-timeline {
    max-width: 700px;
  }
  
  .etapas-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding-top: 0;
  }
  
  .etapas-row::before {
    display: none; /* Hide horizontal line on tablet/mobile */
  }
  
  .etapas-item {
    width: 45%; /* 2 per row */
    margin-bottom: 30px;
  }
  
  .etapas-number {
    margin-bottom: 15px;
  }
}

@media (max-width: 767px) {
  .etapas {
    padding: 40px 0;
  }

  .etapas-title {
    font-size: 2.2rem;
    margin-bottom: 28px;
  }

  .etapas-row {
    gap: 14px;
    margin-bottom: 28px;
  }

  .etapas-item {
    margin-bottom: 14px;
  }

  .etapas-number {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    margin: 0 auto 10px;
  }

  .etapas-card {
    padding: 16px;
    border-radius: 10px;
    min-height: 140px;
  }

  .etapas-header {
    margin-bottom: 12px;
  }

  .etapas-icon {
    font-size: 1.6rem;
  }

  .etapas-check {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .etapas-status {
    font-size: 0.68rem;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
  }

  .etapas-name {
    font-size: 1.05rem;
    line-height: 1.15;
  }
}

@media (max-width: 576px) {
  .etapas-title {
    font-size: 2rem;
    margin-bottom: 22px;
  }

  .etapas-row {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
  }
  
  .etapas-item {
    width: 100%;
    max-width: 340px;
    margin-bottom: 0;
  }
  
  /* Vertical Line for Mobile */
  .etapas-timeline::before {
    content: '';
    position: absolute;
    top: 70px; /* Start below title */
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #444;
    transform: translateX(-50%);
    z-index: 0;
  }
  
  .etapas-number {
    background-color: #fcfcfc; /* Mask the line behind number */
    border: 2px solid #444;
    color: #444;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    margin-bottom: 10px;
  }
  
  .etapas-item.active .etapas-number {
    background-color: #ac815e;
    border-color: #ac815e;
    color: #fff;
  }
}
