/* How EstiMate Works — 5-tab interactive walkthrough */
.how-it-works-section {
  background: #0b0b0d;
  padding: 64px 40px;
}

.how-it-works-container {
  max-width: 1307px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.how-it-works-heading-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  padding: 60px 0;
}

.how-it-works-heading-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.how-it-works-label {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  color: #3a7cff;
}

.how-it-works-heading {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 87px;
  color: #ffffff;
  margin: 0;
}

.how-it-works-heading-accent {
  display: block;
  color: #3a7cff;
}

.how-it-works-subtitle {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 44px;
  color: #b7d0ff;
  max-width: 1000px;
  margin: 0;
}

/* Panel */
.how-it-works-panel {
  width: 100%;
  display: flex;
  align-items: stretch;
}

.how-it-works-tabs {
  flex: none;
  display: flex;
  flex-direction: column;
  width: 132px;
}

.how-it-works-tab {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  padding: 16px;
  gap: 4px;
  width: 100%;
  margin-top: -1px;
  background: transparent;
  border: 1px solid #88b0ff;
  border-right: none;
  border-radius: 32px 0 0 32px;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  color: #ffffff;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.how-it-works-tabs .how-it-works-tab:first-child {
  margin-top: 0;
}

.how-it-works-tab:hover {
  background: rgba(58, 124, 255, 0.15);
}

.how-it-works-tab.active {
  background: #3a7cff;
  border-color: #3a7cff;
  position: relative;
  z-index: 1;
}

.how-it-works-tab-number,
.how-it-works-tab-label {
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: #ffffff;
}

.how-it-works-tab-label {
  font-weight: 700;
}

.how-it-works-content {
  flex: 1;
  position: relative;
  border: 1px solid #88b0ff;
  border-radius: 0 24px 24px 0;
  overflow: hidden;
}

.how-it-works-panel-item {
  position: absolute;
  inset: 0;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.how-it-works-panel-item.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.how-it-works-text {
  flex: 1;
  display: flex;
  padding: 60px 0;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}

.how-it-works-eyebrow {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: #5891ff;
}

.how-it-works-text h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: 40px;
  color: #ffffff;
  margin: 0;
}

.how-it-works-text ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how-it-works-text li {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: #b7d0ff;
}

.how-it-works-text li strong {
  font-weight: 700;
  color: #ffffff;
}

.how-it-works-image {
  flex: 1.1;
  overflow: hidden;
}

.how-it-works-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile / Tablet alternate: simplified 3-step version */
.how-it-works-mobile {
  display: none;
}

.how-it-works-mobile-heading {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.3;
  color: #ffffff;
  margin: 0;
}

.how-it-works-mobile-heading span {
  color: #3a7cff;
}

.how-it-works-mobile-intro {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: #b7d0ff;
  margin: 16px 0 0;
}

.how-it-works-mobile-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}

.how-it-works-mobile-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.how-it-works-mobile-icon {
  display: block;
  line-height: 0;
}

.how-it-works-mobile-step h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 32px;
  color: #ffffff;
  margin: 0;
}

.how-it-works-mobile-step p {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  color: #edf3ff;
  margin: 0;
}

/* Tablet & Mobile: swap the interactive tab panel for the simplified version */
@media (max-width: 1024px) {
  .how-it-works-section {
    padding: 56px 20px;
  }

  .how-it-works-heading-row {
    display: none;
  }

  .how-it-works-panel {
    display: none;
  }

  .how-it-works-mobile {
    display: block;
  }
}

@media (max-width: 480px) {
  .how-it-works-mobile-heading {
    font-size: 32px;
  }

  .how-it-works-mobile-intro {
    font-size: 18px;
    line-height: 28px;
  }
}
