/* ==========================================================================
   TuWebLocal — Bloques de conversión reutilizables (a2, 2026-09-15)
   Para páginas que reciben tráfico de pago y necesitan capturar el contacto:
   /precios y /cuanto-cuesta-una-pagina-web.
   Usa las variables del tema (twl-theme.css) para no romper la identidad.
   ========================================================================== */

/* --- Barra de promesa bajo el H1: lo primero que ve quien llega de un anuncio --- */
.twl-promesa {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  align-items: center;
  justify-content: center;
  background: var(--twl-grad-soft);
  border: 1px solid #d7e9f4;
  border-radius: var(--twl-radius);
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0 2rem;
  text-align: center;
}
.twl-promesa b { color: var(--twl-ink); }
.twl-promesa span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--twl-ink);
  white-space: nowrap;
}
.twl-promesa i { font-style: normal; color: #1f9d55; font-weight: 800; }

/* Botón inmediato bajo la barra de promesa: la salida rápida para quien
   llega de un anuncio y no quiere leerse el artículo entero. */
.twl-promesa-cta { text-align: center; margin: -.8rem 0 2.4rem; }
/* El tema pinta los enlaces del artículo en azul con más especificidad:
   el color del texto de estos botones se fuerza o queda azul sobre azul. */
.twl-promesa-cta a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--twl-deep);
  color: #fff !important;
  font-weight: 800;
  font-size: 1.05rem;
  padding: .95rem 1.6rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(23,107,224,.25);
  transition: transform .15s;
}
.twl-promesa-cta a:hover { transform: translateY(-2px); }

/* Enlace secundario junto al botón del hero de /precios */
.hero__cta-alt {
  display: inline-block;
  margin-left: .9rem;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: .92;
}
@media (max-width: 700px) {
  .hero__cta-alt { display: block; margin: .9rem 0 0; }
}
.twl-promesa-cta small { display: block; margin-top: .6rem; font-size: .84rem; color: var(--twl-body); }

/* --- Banda estrecha de llamada a la acción para mitad de artículo --- */
.twl-cta-linea {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .9rem 1.4rem;
  background: linear-gradient(160deg, var(--twl-navy), var(--twl-navy-2));
  border-radius: var(--twl-radius);
  padding: 1.5rem 1.6rem;
  margin: var(--s-6) auto;
  max-width: 980px;
  text-align: center;
}
.twl-cta-linea p {
  margin: 0;
  color: #e4f0f8 !important;
  font-size: var(--fs-base);
  font-weight: 600;
  max-width: 460px;
}
.twl-cta-linea b { color: #ffc857 !important; }
.twl-cta-linea a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--twl-amber);
  color: #3a2a00 !important;
  font-weight: 800;
  font-size: 1.02rem;
  padding: .95rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  transition: transform .15s;
}
.twl-cta-linea a:hover { transform: translateY(-2px); }

/* --- Caja de captura: el bloque central de conversión --- */
.twl-captura {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  background: #fff;
  border: 1px solid #dceaf3;
  border-radius: var(--twl-radius);
  overflow: hidden;
  box-shadow: var(--twl-shadow-lg);
  margin: var(--s-7) auto;
  max-width: 980px;
  scroll-margin-top: 90px;
}
.twl-captura__info {
  background: linear-gradient(160deg, var(--twl-navy), var(--twl-navy-2));
  color: #fff;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* El tema del sitio pinta h3/b/li en tinta oscura con más especificidad que
   una clase suelta, y sobre el panel azul marino quedaban ilegibles.
   Se fuerza el color aquí para garantizar el contraste. */
.twl-captura .twl-captura__info h3 {
  margin: 0 0 1.3rem;
  font-size: 1.28rem;
  line-height: 1.3;
  color: #fff !important;
}
.twl-captura .twl-captura__pasos { list-style: none; margin: 0; padding: 0; }
.twl-captura .twl-captura__pasos li {
  display: flex;
  gap: .8rem;
  margin-bottom: 1.1rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: #d7e7f2 !important;
}
.twl-captura .twl-captura__pasos li > span:last-child { color: #d7e7f2 !important; }
.twl-captura .twl-captura__pasos b {
  display: block;
  color: #ffc857 !important;
  font-size: var(--fs-base);
  margin-bottom: .15rem;
  font-weight: 800;
}
.twl-captura__n {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--twl-amber);
  color: #3a2a00;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: .9rem;
}
.twl-captura .twl-captura__garantia {
  margin-top: .6rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,.18);
  font-size: var(--fs-sm);
  color: #cfe4f1 !important;
  line-height: 1.5;
}

.twl-captura .twl-captura__prueba {
  margin: 1.1rem 0 0;
  font-size: .84rem;
  line-height: 1.55;
  color: #a9c7db !important;
}
.twl-captura .twl-captura__prueba b { color: #e4f0f8 !important; font-weight: 700; }

/* --- Formulario --- */
.twl-cta-form { padding: 2.1rem 2rem 1.9rem; }
.twl-cta-form label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .95rem; color: var(--twl-ink); }
.twl-cta-form label > span { display: block; margin-bottom: .35rem; }
.twl-cta-form input[type=text],
.twl-cta-form input[type=tel],
.twl-cta-form select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--twl-ink);
  background: #f8fbfd;
  border: 1.5px solid #dceaf3;
  border-radius: 11px;
  padding: .8rem .95rem;
  min-height: 52px;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.twl-cta-form select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2322405c' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 2.4rem;
}
.twl-cta-form input:focus,
.twl-cta-form select:focus {
  outline: none;
  border-color: var(--twl-deep);
  box-shadow: 0 0 0 4px rgba(23,107,224,.12);
  background: #fff;
}
.twl-cta-form .twl-consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: .6rem;
  align-items: start;
  font-weight: 500;
  font-size: .82rem;
  color: var(--twl-body);
  line-height: 1.45;
}
.twl-cta-form .twl-consent input { width: 20px; height: 20px; min-height: 0; margin-top: .1rem; accent-color: var(--twl-deep); }
.twl-cta-form .twl-consent a { color: var(--twl-deep); }
.twl-cta-form button[type=submit] {
  width: 100%;
  margin-top: 1rem;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 1.05rem;
  border: 0;
  border-radius: 12px;
  background: var(--twl-deep);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(23,107,224,.3);
  transition: transform .15s, box-shadow .15s;
}
.twl-cta-form button[type=submit]:hover { transform: translateY(-2px); }
.twl-cta-form button[type=submit]:disabled { opacity: .7; cursor: default; transform: none; }
.twl-cta-form .estado { margin: .7rem 0 0; font-size: .9rem; min-height: 1.3em; }
.twl-cta-form .estado.err { color: #c62828; font-weight: 700; }
.twl-cta-form .twl-tras-boton { margin: .8rem 0 0; font-size: .86rem; color: var(--twl-body); text-align: center; }

/* --- Alternativa: WhatsApp y teléfono, para quien no quiere formularios --- */
.twl-alt {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
  margin: 1.4rem 0 0;
}
.twl-alt a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 12px;
  padding: .85rem 1.4rem;
  transition: transform .15s;
}
.twl-alt a:hover { transform: translateY(-2px); }
.twl-alt .wa { background: #23c463; color: #fff !important; }
.twl-alt .tel { background: #fff; color: var(--twl-ink) !important; border: 1.5px solid #dceaf3; }

/* --- Prueba social compacta --- */
.twl-prueba {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: var(--s-6) 0;
}
.twl-prueba div {
  background: #fff;
  border: 1px solid #e3eef5;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--twl-shadow-sm);
}
.twl-prueba b { display: block; color: var(--twl-deep); font-size: 1.35rem; line-height: 1.1; margin-bottom: .25rem; }
.twl-prueba small { font-size: .85rem; color: var(--twl-body); line-height: 1.45; display: block; }

/* --- Cierre final --- */
.twl-cierre {
  background: linear-gradient(160deg, var(--twl-navy), var(--twl-navy-2));
  color: #fff;
  border-radius: var(--twl-radius);
  padding: 2.4rem 1.8rem;
  text-align: center;
  margin: var(--s-8) auto var(--s-6);
  max-width: 980px;
}
/* En /precios los h2 sin clase salen pequeños: fijamos el tamaño aquí para
   que el cierre pese lo mismo en las dos páginas. */
.twl-cierre h2 {
  color: #fff !important;
  margin: 0 0 .9rem;
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  line-height: 1.18;
  font-weight: 800;
}
.twl-cierre p { color: #d7e7f2 !important; max-width: 620px; margin: 0 auto 1.5rem; }
.twl-cierre a { text-decoration: none; }
.twl-cierre-cta { margin: 0 0 1.6rem; }
.twl-cierre-cta a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--twl-amber);
  color: #3a2a00 !important;
  font-weight: 800;
  font-size: 1.08rem;
  padding: 1rem 1.8rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  transition: transform .15s;
}
.twl-cierre-cta a:hover { transform: translateY(-2px); }
.twl-cierre .twl-alt .tel { background: rgba(255,255,255,.1); color: #fff !important; border-color: rgba(255,255,255,.25); }

/* --- Móvil --- */
@media (max-width: 860px) {
  .twl-captura { grid-template-columns: 1fr; }
  .twl-cta-linea { padding: 1.4rem 1.2rem; }
  .twl-cta-linea a { width: 100%; justify-content: center; }
  .twl-captura__info { padding: 1.8rem 1.4rem; }
  .twl-cta-form { padding: 1.6rem 1.4rem 1.5rem; }
  /* En móvil la barra funciona mejor como lista de comprobación alineada
     a la izquierda: centrada, los ticks se separaban de su texto. */
  .twl-promesa {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
    gap: .7rem;
    padding: 1.1rem 1.2rem;
  }
  .twl-promesa span { white-space: normal; align-items: flex-start; font-size: var(--fs-sm); }
  .twl-promesa i { line-height: 1.5; }
  .twl-alt { flex-direction: column; }
  .twl-alt a { justify-content: center; }
  .twl-cierre { padding: 2rem 1.2rem; }
  /* Estos bloques pueden ir fuera de .container-tw: garantizamos aire lateral */
  .twl-captura,
  .twl-cta-linea,
  .twl-cierre { margin-left: 14px; margin-right: 14px; }
}
