/* ==========================================================================
   CONTRATAR PROTECCIÓN  (Figma 533:2)
   Formulario de solicitud en línea, en bloques sobre fondo claro.
   ========================================================================== */

/* Encabezado común a cada bloque del formulario */
.paso {
  padding: 50px 0;
}

.paso--first {
  padding-top: 96px;
  background: linear-gradient(180deg, var(--color-gray-100), #f0f0f0);
}

.paso--datos {
  background: linear-gradient(180deg, #f0f0f0, #f5f5f5);
}

.paso--uso {
  background: linear-gradient(180deg, #f5f5f5, #fafafa);
}

.paso--contacto {
  padding-bottom: 30px;
  background: linear-gradient(180deg, #fafafa, var(--color-white));
}

.paso__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 38px;
}

.paso__head .eyebrow {
  letter-spacing: 1.04px;
}

.paso__title {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.46px;
  color: var(--color-navy);
}

.paso__lead {
  max-width: 860px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-gray-700);
}

/* Subtítulo de bloque con barra dorada */
.bloque-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 19px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--color-navy);
}

.bloque-head::before {
  flex: 0 0 3px;
  width: 3px;
  height: 22px;
  content: "";
  background: linear-gradient(180deg, var(--color-gold-light), var(--color-gold-dark));
}

.bloque {
  margin-bottom: 38px;
}

.bloque:last-child {
  margin-bottom: 0;
}

.bloque__nota {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-gray-700);
}

/* --------------------------------------------------------------------------
   Seleccione su protección  (Figma 535:2)
   -------------------------------------------------------------------------- */

.opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Cada opción es un radio accesible; la tarjeta es el <label> */
.opcion input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.opcion {
  position: relative;
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 272px;
  padding: 26px 24px;
  cursor: pointer;
  background: var(--color-white);
  border: 1px solid #e4e6ea;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(14, 35, 64, 0.1);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.opcion:hover {
  transform: translateY(-2px);
}

.opcion:has(input:checked) {
  border: 1.5px solid var(--color-red);
}

.opcion:has(input:focus-visible) {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.opcion__icon {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-gold-light);
  border-radius: 12px;
}

.opcion:has(input:checked) .opcion__icon {
  border-color: var(--color-red);
}

.opcion__icon img {
  width: 24px;
  height: 24px;
}

.opcion h3 {
  font-size: 17px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--color-navy);
}

.opcion p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--color-gray-700);
}

.opcion__link {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--color-red);
}

/* Variante centrada: tipo de uso del inmueble (Figma 595:30) */
.opciones--centradas .opcion {
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding: 30px 24px;
  text-align: center;
}

.opciones--centradas .opcion p {
  max-width: 340px;
}

/* --------------------------------------------------------------------------
   Campos del formulario
   -------------------------------------------------------------------------- */

.campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campo > label {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  color: var(--color-navy);
}

.campo input,
.campo select {
  width: 100%;
  padding: 16px 20px;
  font: inherit;
  font-size: 16px;
  color: var(--color-navy);
  background: var(--color-white);
  border: 1px solid #cfd1d9;
  border-radius: 10px;
  appearance: none;
}

.campo select {
  padding-right: 46px;
  background-image: url("../assets/icons/contratar/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 20px;
}

.campo input:focus,
.campo select:focus {
  outline: none;
  border-color: var(--color-red);
}

.campo input::placeholder {
  color: var(--color-gray-500);
}

/* Campo de renta con el sufijo MXN */
.campo--moneda {
  position: relative;
  max-width: 420px;
}

.campo--moneda input {
  padding-right: 62px;
  font-size: 17px;
}

.campo--moneda::after {
  position: absolute;
  right: 20px;
  bottom: 18px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--color-red);
  content: "MXN";
  pointer-events: none;
}

.campos-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.campos-row .campo {
  flex: 1 1 320px;
  max-width: 420px;
}

/* --------------------------------------------------------------------------
   Duración: 1 a 5 años  (Figma 536:45)
   -------------------------------------------------------------------------- */

.anios {
  display: flex;
  gap: 20px;
}

.anio {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 22px 16px;
  cursor: pointer;
  background: var(--color-white);
  border: 1px solid #d9dbe0;
  border-radius: 12px;
  filter: drop-shadow(0 12px 14px rgba(14, 35, 64, 0.1));
  transition: border-color 0.2s ease;
}

.anio input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.anio__num {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: #b8bdc4;
  transition: color 0.2s ease;
}

.anio__label {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  color: var(--color-navy);
}

.anio:has(input:checked) {
  border: 1.5px solid var(--color-red);
}

.anio:has(input:checked) .anio__num {
  color: var(--color-red);
}

.anio:has(input:focus-visible) {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Datos de contacto  (Figma 537:2)
   -------------------------------------------------------------------------- */

.contacto-paso__inner {
  display: flex;
  gap: 72px;
  align-items: center;
  justify-content: center;
}

.contacto-paso__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.contacto-paso__copy .paso__head {
  margin-bottom: 0;
}

.contacto-paso__photo {
  position: relative;
  max-width: 532px;
  height: 280px;
  overflow: hidden;
  border-radius: 18px;
}

.contacto-paso__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.contacto-paso__photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(14, 35, 64, 0) 0%,
    rgba(14, 35, 64, 0.35) 50%,
    rgba(14, 35, 64, 0.92) 100%
  );
}

.contacto-card {
  display: flex;
  flex: 0 0 600px;
  flex-direction: column;
  gap: 22px;
  padding: 34px;
  background: var(--color-white);
  border: 1px solid #e4e6ea;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 12px 14px rgba(14, 35, 64, 0.1));
}

.contacto-card h2 {
  font-size: 22px;
  font-weight: var(--fw-bold);
  line-height: 1.24;
  color: var(--color-navy);
}

.contacto-card .campos-row .campo {
  max-width: none;
}

.contacto-card .campo--lada {
  flex: 0 0 120px;
}

.contacto-card input {
  padding: 14px 16px;
  font-size: 15px;
}

.contacto-card__rule {
  width: 100%;
  height: 1px;
  margin: 0;
  background: #e3e5e9;
  border: 0;
}

.contacto-card .btn--primary {
  justify-content: center;
  width: 100%;
  padding: 17px 28px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .paso__title {
    font-size: 36px;
  }

  .anios {
    flex-wrap: wrap;
  }

  .anio {
    flex: 1 1 30%;
  }

  .contacto-paso__inner {
    flex-direction: column;
    gap: 40px;
    align-items: stretch;
  }

  .contacto-card {
    flex: 1 1 auto;
  }

  .contacto-paso__photo {
    max-width: none;
  }
}

@media (max-width: 639px) {
  .paso,
  .paso--first {
    padding: 48px 0;
  }

  .paso__title {
    font-size: 30px;
  }

  .opcion {
    flex: 1 1 100%;
    min-height: 0;
  }

  .anio {
    flex: 1 1 45%;
  }

  .contacto-card {
    padding: 24px;
  }

  .contacto-card .campo--lada {
    flex: 1 1 100%;
  }
}
