/* =========================================================
   APEX · Landing de gestión de redes (gestion.apexdigmkt.com)
   Usa web.css (el mismo de la web de empresa, en claro) y
   añade solo las piezas propias de esta landing.
   ========================================================= */

/* ---------- Portada: foto del estudio con clientes flotando ---------- */
.portada__nota { margin: 16px 0 0; font-size: 14px; color: var(--texto-suave); }
.estudio { position: relative; justify-self: center; width: min(460px, 100%); padding: 28px 0; }
.estudio__marco {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background: #0B1622; border: 1px solid var(--borde);
  box-shadow: 0 40px 80px -24px rgba(11, 22, 34, .45);
  transform: rotate(2deg);
}
.estudio__marco img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px;
  max-width: 270px; padding: 8px 14px 8px 8px; border-radius: 14px;
  background: #fff; border: 1px solid var(--borde); box-shadow: 0 16px 34px -14px rgba(11, 22, 34, .35);
  text-align: left;
}
.chip__foto { flex: none; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 1px solid var(--borde); }
.chip__quien { margin: 0; font-size: 12px; font-weight: 700; color: var(--texto); line-height: 1.25; }
.chip__dato { margin: 0; font-size: 12.5px; line-height: 1.3; color: var(--texto-suave); }
.chip__dato strong { font-family: var(--fuente-titulos); font-weight: 800; font-size: 16px; color: var(--acero); white-space: nowrap; }
.chip--1 { top: 2%;  left: -18%; --r: -3deg; --d: .4s;  --t: 3.8s; }
.chip--2 { top: 30%; right: -20%; --r: 2.5deg; --d: .7s; --t: 4.3s; }
.chip--3 { top: 58%; left: -22%; --r: 2deg;  --d: 1s;   --t: 4s; }
.chip--4 { bottom: 2%; right: -14%; --r: -2deg; --d: 1.3s; --t: 4.6s; }
.chip { transform: rotate(var(--r)); }
@media (prefers-reduced-motion: no-preference) {
  .chip { opacity: 0; animation: chip-sube .8s ease-out var(--d) forwards, chip-flota var(--t) ease-in-out calc(var(--d) + .8s) infinite alternate; }
  @keyframes chip-sube { from { opacity: 0; transform: translateY(16px) rotate(var(--r)); } to { opacity: 1; transform: rotate(var(--r)); } }
  @keyframes chip-flota { from { transform: translateY(0) rotate(var(--r)); } to { transform: translateY(-9px) rotate(var(--r)); } }
}
@media (max-width: 1200px) and (min-width: 861px) {
  .chip--1 { left: -10%; } .chip--2 { right: -8%; } .chip--3 { left: -12%; } .chip--4 { right: -6%; }
}
@media (max-width: 860px) {
  .portada__nota { text-align: center; }
  .estudio { width: min(360px, 88%); padding: 18px 0 8px; }
  .estudio__marco { transform: none; border-radius: 22px; }
  .chip { max-width: 64%; padding: 6px 10px 6px 6px; gap: 8px; }
  .chip__foto { width: 34px; height: 34px; border-radius: 8px; }
  .chip__quien { font-size: 11px; }
  .chip__dato { font-size: 0; }
  .chip__dato strong { font-size: 14px; }
  .chip--1 { top: 4%;  left: -6%; }
  .chip--2 { top: 34%; right: -6%; }
  .chip--3 { top: 62%; left: -6%; }
  .chip--4 { bottom: 0; right: -4%; }
}

/* ---------- El problema (franja oscura) ---------- */
.datos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.datos li { background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 18px; padding: 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.datos strong { font-family: var(--fuente-titulos); font-weight: 800; font-size: clamp(34px, 3.6vw, 48px); line-height: 1; letter-spacing: -.03em; color: var(--cielo); }
.datos span { color: var(--texto-suave); font-size: 16px; line-height: 1.45; }
.fuente { margin: 14px 0 0; font-size: 13px; color: var(--texto-suave); }
.fuente a { color: var(--texto-suave); }
.problema { margin-top: 48px; max-width: 760px; display: grid; gap: 10px; font-size: clamp(18px, 1.8vw, 21px); color: var(--texto-suave); }
.problema p { margin: 0; }
.problema__remate { margin-top: 14px !important; font-family: var(--fuente-titulos); font-weight: 800; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.03em; color: var(--texto); }

/* ---------- Lo que te frena ---------- */
.frenos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.freno { padding: 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sombra); }
.freno__foto { aspect-ratio: 16 / 11; overflow: hidden; background: #0B1622; }
.freno__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .5s ease; }
.freno:hover .freno__foto img { transform: scale(1.04); }
.freno__cuerpo { padding: 22px 22px 26px; display: grid; gap: 10px; }
.freno__frase { margin: 0; font-family: var(--fuente-titulos); font-weight: 800; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; color: var(--texto); }
.freno__resp { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--texto-suave); }

/* ---------- Casos y botón ---------- */
.accion { margin: 36px 0 0; }

/* ---------- Qué hacemos ---------- */
.incluye { box-shadow: var(--sombra); }
.incluye__fase { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acero); }
.incluye--clave { background: linear-gradient(145deg, #0E3A5A, #215E87); border-color: transparent; color: #fff; }
.incluye--clave h4 { color: #fff; }
.incluye--clave p { color: rgba(255, 255, 255, .85); }
.incluye--clave .incluye__fase { color: #9ED8EA; }
.compromiso { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 18px; box-shadow: var(--sombra); overflow: hidden; }
.compromiso__dato { padding: 24px 28px; display: flex; flex-direction: column; gap: 4px; }
.compromiso__dato + .compromiso__dato { border-left: 1px solid var(--borde); }
.compromiso__dato strong { font-family: var(--fuente-titulos); font-weight: 800; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.03em; color: var(--acero); }
.compromiso__dato span { color: var(--texto-suave); font-size: 15.5px; }

/* ---------- Comparativa ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tabla-caja { overflow-x: auto; background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 18px; box-shadow: var(--sombra); }
.comparativa { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
.comparativa th, .comparativa td { padding: 18px 22px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.comparativa tbody tr:last-child th, .comparativa tbody tr:last-child td { border-bottom: 0; }
.comparativa thead th { font-size: 14px; color: var(--texto-suave); font-weight: 700; background: var(--fondo); }
.comparativa tbody th { font-weight: 700; width: 26%; color: var(--texto); }
.comparativa td { color: var(--texto-suave); font-size: 15.5px; }
.comparativa .comparativa__apex { background: #EAF4FA; color: var(--texto); font-weight: 600; }
.comparativa thead .comparativa__apex { background: linear-gradient(145deg, #0E3A5A, #215E87); color: #fff; font-size: 18px; letter-spacing: .06em; }
.marca { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; font-size: 12px; font-weight: 700; vertical-align: middle; }
.marca--no { background: #EEF2F5; color: #8A97A5; }
.marca--medio { background: #EEF2F5; color: var(--texto-suave); }
.marca--si { background: var(--acero); color: #fff; }

/* ---------- Para quién es y para quién no ---------- */
.encaja { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.encaja__lado { box-shadow: var(--sombra); padding: 32px; }
.encaja__lado h4 { font-family: var(--fuente-titulos); font-weight: 800; font-size: 24px; letter-spacing: -.02em; margin: 0 0 16px; }
.encaja__lado ul { list-style: none; margin: 0; padding: 0; }
.encaja__lado li { position: relative; padding: 12px 0 12px 34px; border-top: 1px solid var(--borde); color: var(--texto-suave); font-size: 16px; }
.encaja__lado li::before { position: absolute; left: 0; top: 12px; font-weight: 700; }
.encaja__lado--si { border-color: rgba(33, 94, 135, .35); }
.encaja__lado--si h4 { color: var(--acero); }
.encaja__lado--si li { color: var(--texto); }
.encaja__lado--si li::before { content: "✓"; color: var(--acero); }
.encaja__lado--no li::before { content: "✕"; color: #8A97A5; }

/* ---------- Quiénes somos: "En tu negocio" ---------- */
.persona__tu { margin: 0 0 22px; padding: 14px 16px; border-left: 2px solid var(--cielo); background: rgba(98, 188, 215, .08); border-radius: 0 10px 10px 0; color: var(--texto); font-size: 15.5px; line-height: 1.45; max-width: 52ch; }
.persona__tu span { display: block; color: var(--cielo); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.equipo-seccion .historia { gap: 10px; }

/* ---------- Preguntas frecuentes ---------- */
.faq-rejilla { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.faq-rejilla .sub__cabeza { margin: 0; position: sticky; top: calc(var(--alto-cab) + 32px); }
.faq { display: grid; gap: 10px; }
.faq__item { background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra); }
.faq__item summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative; font-weight: 700; font-size: 17px; color: var(--texto); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--claro); color: var(--acero); font-weight: 700; transition: transform .2s; }
.faq__item[open] summary::after { content: "–"; }
.faq__item summary:focus-visible { outline: 2px solid var(--acero); outline-offset: 2px; border-radius: 16px; }
.faq__item p { margin: 0; padding: 0 24px 22px; color: var(--texto-suave); font-size: 16px; line-height: 1.6; }

/* ---------- Pie ---------- */
.pie__aviso { margin: 0 auto 22px; max-width: 70ch; font-size: 12.5px; color: rgba(255, 255, 255, .5); text-align: center; }

/* ---------- Botón fijo en el móvil ---------- */
.barra-movil { display: none; }
@media (max-width: 860px) {
  .barra-movil { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(246, 248, 250, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--borde); }
  .barra-movil .boton { width: 100%; background: #0B1622; color: #fff; }
  body { padding-bottom: 76px; }
}

/* ---------- Formulario (ventana antes de WhatsApp) ---------- */
.formulario { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; }
.formulario[hidden] { display: none; }
.formulario__fondo { position: absolute; inset: 0; background: rgba(11, 22, 34, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.formulario__caja { position: relative; width: 100%; max-width: 620px; max-height: calc(100dvh - 32px); overflow-y: auto; background: #fff; border: 1px solid var(--borde); border-radius: 22px; padding: 36px 32px 28px; box-shadow: 0 30px 90px rgba(11, 22, 34, .35); animation: formulario-entra .35s ease-out; }
@keyframes formulario-entra { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
html.formulario-abierto { overflow: hidden; }
html.formulario-abierto .barra-movil { display: none !important; }
.formulario__cerrar { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--borde); background: #fff; color: var(--texto); font-size: 16px; cursor: pointer; }
.formulario__cerrar:hover { border-color: var(--acero); color: var(--acero); }
.formulario__titulo { font-family: var(--fuente-titulos); font-weight: 800; letter-spacing: -.03em; font-size: clamp(28px, 4vw, 36px); line-height: 1.1; margin: 0 0 10px; }
.formulario__sub { color: var(--texto-suave); margin: 0 0 24px; font-size: 16px; }
.formulario__campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo--ancho { grid-column: 1 / -1; }
.campo > span { font-size: 13px; font-weight: 700; color: var(--texto); }
.campo em { font-style: normal; font-weight: 400; color: var(--texto-suave); }
.campo input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(33, 94, 135, .25); background: var(--fondo); color: var(--texto); font: 16px var(--fuente); }
.campo input::placeholder { color: #9AA6B2; }
.campo input:focus { outline: none; border-color: var(--acero); box-shadow: 0 0 0 3px rgba(33, 94, 135, .15); background: #fff; }
.campo input:user-invalid { border-color: #D45B5B; }
.formulario__rgpd { margin: 0 0 14px; border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; }
.formulario__rgpd table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.45; }
.formulario__rgpd caption { text-align: left; padding: 10px 12px 6px; font-weight: 700; font-size: 12px; color: var(--texto); }
.formulario__rgpd th, .formulario__rgpd td { text-align: left; vertical-align: top; padding: 6px 12px; border-top: 1px solid var(--borde); color: var(--texto-suave); }
.formulario__rgpd th { width: 32%; color: var(--texto); font-weight: 700; }
.casilla { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; font-size: 14px; color: var(--texto-suave); cursor: pointer; }
.casilla input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #215E87; }
.formulario__error { color: #C24444; font-size: 14px; margin: 8px 0 0; }
.formulario__enviar { display: flex; width: 100%; margin-top: 18px; border: 0; cursor: pointer; font-size: 17px; background: #0B1622; color: #fff; }
.formulario__enviar:hover { background: #215E87; }
.formulario__enviar:disabled { opacity: .7; cursor: wait; }
.formulario__nota { text-align: center; color: var(--texto-suave); font-size: 13px; margin: 12px 0 0; }

/* ---------- Tamaños más pequeños ---------- */
@media (max-width: 1080px) {
  .frenos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .datos { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .datos li { padding: 18px 20px; text-align: center; align-items: center; }
  .fuente, .problema { text-align: center; margin-inline: auto; }
  .frenos { grid-template-columns: minmax(0, 1fr); }
  .freno__foto { aspect-ratio: 16 / 9; }
  .accion { text-align: center; }
  .compromiso { grid-template-columns: minmax(0, 1fr); }
  .compromiso__dato + .compromiso__dato { border-left: 0; border-top: 1px solid var(--borde); }
  .compromiso__dato { padding: 18px 20px; text-align: center; }
  .rejilla--3, .rejilla--4 { grid-template-columns: minmax(0, 1fr); }
  .encaja { grid-template-columns: minmax(0, 1fr); }
  .encaja__lado { padding: 24px; }
  .faq-rejilla { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .faq-rejilla .sub__cabeza { position: static; margin-bottom: 28px; }
  .persona__tu { text-align: left; margin-inline: auto; }
  .formulario { padding: 0; align-items: end; }
  .formulario__caja { max-height: 94dvh; border-radius: 22px 22px 0 0; padding: 28px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .formulario__campos { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .formulario__rgpd th { width: 38%; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .rejilla--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Comparativa en móvil: cada fila es un bloque y APEX siempre se ve */
@media (max-width: 700px) {
  .tabla-caja { overflow: visible; background: none; border: 0; box-shadow: none; }
  .comparativa { min-width: 0; }
  .comparativa thead { display: none; }
  .comparativa, .comparativa tbody, .comparativa tr, .comparativa th, .comparativa td { display: block; width: 100%; }
  .comparativa tr { background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 16px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--sombra); }
  .comparativa tbody th { padding: 16px 16px 6px; border: 0; font-size: 16px; }
  .comparativa td { display: flex; align-items: center; flex-wrap: wrap; padding: 8px 16px; border: 0; }
  .comparativa td::before { content: attr(data-col); width: 100%; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8A97A5; margin-bottom: 4px; }
  .comparativa td.comparativa__apex { padding: 12px 16px 14px; }
  .comparativa td.comparativa__apex::before { color: var(--acero); font-weight: 700; }
}

@media (prefers-reduced-motion: reduce) {
  .chip { opacity: 1; }
  .formulario__caja { animation: none; }
}

/* ---------- Ajustes tras la primera revisión ---------- */
/* Recuadros de la portada: que no se corten por la derecha */
@media (min-width: 861px) {
  .estudio { width: min(400px, 100%); justify-self: center; }
  .chip--1 { left: -26%; }
  .chip--2 { right: -12%; }
  .chip--3 { left: -30%; }
  .chip--4 { right: -8%; }
}
@media (min-width: 861px) and (max-width: 1200px) {
  .chip--1 { left: -14%; } .chip--3 { left: -18%; } .chip--2 { right: -4%; } .chip--4 { right: -2%; }
}
/* Cierre sin hueco de más arriba */
.banda .cierre { margin-top: 0; }
#reservar { padding-top: 24px; }
/* Móvil: comparativa con el título a lo ancho y casos sin palabras partidas */
@media (max-width: 700px) {
  .comparativa tbody th { width: 100%; }
}
@media (max-width: 600px) {
  .exito__cambio { grid-template-columns: minmax(0, 1fr) !important; gap: 8px; }
  .exito__flecha { transform: rotate(90deg); justify-self: center; }
  .exito__dato { word-break: normal; overflow-wrap: normal; hyphens: none; }
}
/* Móvil: arriba solo el logo (el botón ya está fijo abajo) */
@media (max-width: 860px) {
  .cabecera__fila > .boton { display: none; }
  .cabecera__fila { justify-content: center; }
}

/* ---------- Comparativa en el móvil: una tarjeta por camino ---------- */
.caminos { display: none; }
@media (max-width: 700px) {
  .tabla-caja { display: none; }
  .caminos { display: grid; gap: 12px; }
  .camino { background: var(--fondo-2); border: 1px solid var(--borde); border-radius: 18px; padding: 20px 20px 18px; box-shadow: var(--sombra); }
  .camino__nombre { margin: 0 0 12px; font-family: var(--fuente-titulos); font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--texto-suave); }
  .camino ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
  .camino li { display: flex; align-items: center; gap: 2px; font-size: 15.5px; color: var(--texto-suave); line-height: 1.35; }
  .camino .marca { flex: none; }
  .camino--apex { background: linear-gradient(145deg, #0B1622, #0E3A5A 60%, #215E87); border-color: transparent; box-shadow: 0 20px 40px -18px rgba(14, 58, 90, .6); padding: 24px 22px 22px; }
  .camino--apex .camino__nombre { color: #fff; font-size: 22px; }
  .camino--apex li { color: #fff; font-weight: 600; }
  .camino--apex .marca--si { background: #62BCD7; color: #0B1622; }
}
