/* ===========================================
  CÓMO FUNCIONA - Landing Principal
=========================================== */

.como-funciona-section {
  padding: 2rem 0;
  background: #fff;
}

/* -------------------------------------------
  Encabezado
------------------------------------------- */
.como-funciona-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gris-oscuro);
  margin-bottom: 1rem;
}

.como-funciona-subtitle {
  font-size: 1rem;
  color: var(--gris);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* -------------------------------------------
  Mockup Container
------------------------------------------- */
.mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

/* -------------------------------------------
  Pasos Desktop (ocultos en mobile)
------------------------------------------- */
.mockup-pasos {
  display: none;
}

/* -------------------------------------------
  Teléfono
------------------------------------------- */
.mockup-telefono {
  flex-shrink: 0;
}

.telefono-frame {
  width: 280px;
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* WhatsApp Header */
.wa-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--p-verde);
}

.wa-header-avatar {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wa-header-avatar img {
  width: 28px;
  height: auto;
}

.wa-header-info {
  display: flex;
  flex-direction: column;
}

.wa-header-nombre {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.wa-header-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

/* WhatsApp Chat */
.wa-chat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: #e5ddd5;
  min-height: 300px;
}

.wa-mensaje {
  max-width: 85%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  position: relative;
}

.wa-mensaje p {
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 0.25rem;
}

.wa-hora {
  font-size: 0.65rem;
  color: rgba(0, 0, 0, 0.4);
  display: block;
  text-align: right;
}

.wa-mensaje--enviado {
  align-self: flex-end;
  background: #dcf8c6;
  border-radius: 0.5rem 0.5rem 0 0.5rem;
}

.wa-mensaje--recibido {
  align-self: flex-start;
  background: #fff;
  border-radius: 0.5rem 0.5rem 0.5rem 0;
}

/* -------------------------------------------
  Pasos Mobile
------------------------------------------- */
.mockup-pasos-mobile {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.mockup-paso-mobile {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.mockup-paso-numero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--p-verde);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.mockup-paso-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gris-oscuro);
  margin: 0 0 0.25rem;
}

.mockup-paso-texto {
  font-size: 0.9rem;
  color: var(--gris);
  line-height: 1.5;
  margin: 0;
}

/* -------------------------------------------
  CTA
------------------------------------------- */
.como-funciona-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.btn-como-funciona {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--gris-oscuro);
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid rgba(117, 102, 219, 0.1);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.btn-como-funciona:hover {
  background: rgba(117, 102, 219, 0.05);
  border-color: rgba(117, 102, 219, 0.2);
  color: var(--gris-oscuro);
}

.btn-como-funciona svg {
  transition: transform 0.2s ease;
}

.btn-como-funciona:hover svg {
  transform: translateX(3px);
}

/* -------------------------------------------
  Responsive
------------------------------------------- */
@media (min-width: 576px) {
  .btn-como-funciona {
    width: auto;
  }
}

@media (min-width: 768px) {
  .como-funciona-title {
    font-size: 2.5rem;
  }

  .como-funciona-subtitle {
    font-size: 1.1rem;
  }
}

@media (min-width: 992px) {
  .como-funciona-section {
    padding: 6rem 0;
  }

  /* Ocultar pasos mobile */
  .mockup-pasos-mobile {
    display: none;
  }

  /* Container */
  .mockup-container {
    position: relative;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    max-width: 950px;
    margin: 0 auto;
  }

  /* Mostrar pasos desktop */
  .mockup-pasos {
    display: block;
    width: 320px;
    position: relative;
    height: 420px;
  }

  .mockup-pasos--izquierda {
    padding-right: 1.5rem;
  }

  .mockup-pasos--derecha {
    padding-left: 1.5rem;
  }

  /* Paso base */
  .mockup-paso {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
  }

  .mockup-paso-contenido {
    max-width: 280px;
  }

  /* Izquierda: contenido primero, línea después */
  .mockup-pasos--izquierda .mockup-paso {
    flex-direction: row;
    right: 0;
  }

  .mockup-pasos--izquierda .mockup-paso-contenido {
    text-align: right;
  }

  .mockup-pasos--izquierda .mockup-paso-header {
    justify-content: flex-end;
  }

  /* Derecha: línea primero, contenido después */
  .mockup-pasos--derecha .mockup-paso {
    flex-direction: row;
    left: 0;
  }

  .mockup-pasos--derecha .mockup-paso-contenido {
    text-align: left;
  }

  .mockup-pasos--derecha .mockup-paso-header {
    justify-content: flex-start;
  }

  /* Posiciones específicas */
  .mockup-paso--1 {
    top: 80px;
  }

  .mockup-paso--2 {
    top: 170px;
  }

  .mockup-paso--3 {
    top: 315px;
  }

  /* Número y título en línea */
  .mockup-paso-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
  }

  .mockup-paso-numero {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .mockup-paso-titulo {
    font-size: 1.1rem;
    margin: 0;
  }

  /* Línea conectora */
  .mockup-paso-linea {
    width: 40px;
    height: 2px;
    background: var(--p-verde);
    flex-shrink: 0;
  }

  /* Teléfono */
  .telefono-frame {
    width: 320px;
  }

  .wa-chat {
    min-height: 360px;
  }

  .wa-mensaje p {
    font-size: 0.85rem;
  }
}