/* Puyu 2.7 · interacción y versión celular */

/* ---------- Color: más ritmo entre secciones ---------- */
body.pd-con-elementor .pe-hero.e-con, body.pd-con-elementor .pe-head.e-con {
  background:
    radial-gradient(60% 50% at 88% 8%, rgba(233, 194, 122, .28), transparent 70%),
    radial-gradient(40% 40% at 0% 100%, rgba(201, 151, 63, .10), transparent 70%),
    var(--pe-fondo);
}
body.pd-con-elementor .pe-cinta-sec.e-con { --width: 100%; --padding-top: 0px; --padding-bottom: 0px; background: var(--pe-tinta); }
.pe-cinta.pe-cinta-o { margin: 0; border: 0; padding: 18px 0; }
.pe-cinta.pe-cinta-o div { color: #F1ECE3; font-size: 22px; animation-duration: 38s; }
.pe-cinta.pe-cinta-o b { color: var(--pe-oro2); margin: 0 6px 0 26px; font-weight: 700; }
.pe-cinta.pe-cinta-o span { margin: 0 18px; }

/* ---------- Test "Encuentra tu plan" ---------- */
body.pd-con-elementor .pe-reco-sec.e-con {
  background: linear-gradient(160deg, #1B1915 0%, #121110 55%, #2A2116 100%);
  position: relative; overflow: hidden;
}
body.pd-con-elementor .pe-reco-sec.e-con::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 194, 122, .22), transparent 65%); pointer-events: none;
}
body.pd-con-elementor .pe-reco-grid.e-con { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
.pe-reco-sec .pe-eti .elementor-heading-title { color: rgba(241, 236, 227, .65); }
.pe-reco-sec .pe-h2 .elementor-heading-title { color: #F1ECE3; }
.pe-reco-sec em { color: var(--pe-oro2) !important; }
.pe-reco-sec .pe-texto p { color: rgba(241, 236, 227, .72); }

.pe-reco { background: #FBF8F2; color: var(--pe-tinta); border-radius: 28px; padding: 30px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.pe-reco-top[hidden], .pe-reco-res[hidden], .pe-reco-q[hidden] { display: none !important; }
.pe-reco-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.pe-reco-paso { font-size: 13px; font-weight: 600; color: var(--pe-gris); white-space: nowrap; }
.pe-reco-barra { flex: 1; height: 6px; border-radius: 6px; background: #ECE5D8; overflow: hidden; }
.pe-reco-barra i { display: block; height: 100%; width: 33.3%; background: linear-gradient(90deg, var(--pe-oro), var(--pe-oro2)); border-radius: 6px; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.pe-reco-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.pe-reco-q.activo { animation: pe-entra .45s cubic-bezier(.2, .8, .2, 1); }
.pe-reco-q legend { font: 700 26px/1.15 var(--pe-titulo); letter-spacing: -.025em; margin-bottom: 18px; padding: 0; }
.pe-reco-ops { display: grid; gap: 10px; }
.pe-reco-op {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--pe-linea); background: #fff;
  font: 600 16px/1.3 var(--pe-texto); color: var(--pe-tinta); transition: border-color .2s, transform .15s, background .2s;
}
.pe-reco-op svg { flex: 0 0 40px; width: 40px; height: 40px; padding: 10px; box-sizing: border-box; border-radius: 12px; background: #F6EEDD; color: var(--pe-oro); transition: .2s; }
.pe-reco-op i { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #F6EEDD; color: var(--pe-oro); font-size: 17px; transition: .2s; }
.pe-reco-op:hover { border-color: var(--pe-oro); }
.pe-reco-op:active { transform: scale(.98); }
.pe-reco-op.sel { border-color: var(--pe-tinta); background: var(--pe-tinta); color: #fff; }
.pe-reco-op.sel svg { background: var(--pe-oro2); color: var(--pe-tinta); }
.pe-reco-op.sel i { background: var(--pe-oro2); color: var(--pe-tinta); }
.pe-reco-atras { margin-top: 14px; background: none; border: 0; padding: 6px 0; font: 600 14px var(--pe-texto); color: var(--pe-gris); cursor: pointer; }
.pe-reco-res { animation: pe-entra .5s cubic-bezier(.2, .8, .2, 1); }
.pe-reco-res .r-eti { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pe-oro); }
.pe-reco-res h3 { font: 700 38px/1 var(--pe-titulo); letter-spacing: -.035em; margin: 8px 0 6px; }
.pe-reco-res .r-precio { font: 700 44px/1 var(--pe-titulo); letter-spacing: -.04em; margin: 14px 0 4px; }
.pe-reco-res .r-precio small { font: 500 14px var(--pe-texto); color: var(--pe-gris); letter-spacing: 0; }
.pe-reco-res .r-renov, .pe-reco-res .r-por { font-size: 14px; color: var(--pe-gris); }
.pe-reco-res .r-por { margin-top: 2px; }
.pe-reco-res ul { list-style: none; margin: 18px 0 22px; padding: 0; }
.pe-reco-res li { padding: 9px 0 9px 26px; border-top: 1px solid var(--pe-linea); position: relative; font-size: 15px; }
.pe-reco-res li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--pe-oro); }
.pe-reco-res .r-btns { display: grid; gap: 10px; }
.pe-reco-res .r-wa { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 16px; border-radius: 999px; background: #1F9E55; color: #fff; font-weight: 700; }
.pe-reco-res .r-wa:hover { background: #188546; color: #fff; }
.pe-reco-res .r-sec { display: flex; justify-content: space-between; gap: 10px; }
.pe-reco-res .r-sec a, .pe-reco-res .r-sec button { background: none; border: 0; padding: 8px 0; font: 600 14px var(--pe-texto); color: var(--pe-tinta); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@keyframes pe-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Línea de avance y barra fija ---------- */
.pe-progreso { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 100000; pointer-events: none; }
.pe-progreso i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--pe-oro), var(--pe-oro2)); }
.pe-barra { display: none; }

/* ---------- Detalles táctiles ---------- */
.pe-btn .elementor-button:active, .pe-plan-btn:active, .pe-barra a:active { transform: scale(.97); }
.pe-faq details[open] p { animation: pe-entra .35s ease; }
.pe-tabs, .pe-puntos { display: none; }

/* ================= CELULAR ================= */
@media (max-width: 900px) {
  .wa-float { display: none !important; }
  .chat-fab { bottom: 86px !important; }
  .chat-fab::after { content: none !important; }
  .pe-barra {
    display: grid; grid-template-columns: 1fr auto; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60;
    padding: 8px; border-radius: 22px; background: rgba(18, 17, 16, .94); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55);
    transform: translateY(140%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  }
  .pe-barra.ver { transform: none; }
  .nav.open ~ .pe-barra, body.pe-chat-abierto .pe-barra { transform: translateY(140%); }
  .pe-barra a { white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px; border-radius: 16px; font: 700 15px/1 var(--pe-texto); transition: transform .15s; }
  .pe-barra-wa { background: #1F9E55; color: #fff; font-size: 14.5px !important; }
  .pe-barra-pl { padding: 13px 14px !important; }
  .pe-barra-pl { color: #F1ECE3; border: 1px solid rgba(241, 236, 227, .25); }
  body.pd-estudio .footer { padding-bottom: 96px; }

  body.pd-con-elementor .pe-reco-grid.e-con { grid-template-columns: 1fr; gap: 26px; }
  .pe-reco { padding: 22px 18px; border-radius: 24px; }
  .pe-reco-q legend { font-size: 22px; }
  .pe-reco-op { padding: 13px 14px; font-size: 15px; }
  .pe-reco-res h3 { font-size: 32px; }

  /* "Web empresarial" apilado */
  body.pd-con-elementor .pe-extra.e-con { --flex-direction: column; --align-items: stretch; padding: 24px 22px; }
  body.pd-con-elementor .pe-extra .pe-btn .elementor-button { width: 100%; justify-content: center; }
}

@media (max-width: 760px) {
  /* Carruseles para deslizar con el dedo */
  body.pd-con-elementor .pe-desliza.e-con, .pe-desliza.pe-planes {
    display: flex !important; flex-direction: row !important; --flex-direction: row; flex-wrap: nowrap !important; --flex-wrap: nowrap; grid-template-columns: none !important; align-items: stretch !important;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    gap: 14px !important; margin-left: -20px; margin-right: -20px; padding: 6px 20px 14px; scroll-padding: 0 20px;
  }
  .pe-desliza::-webkit-scrollbar { display: none; }
  .pe-desliza > * { flex: 0 0 84% !important; max-width: 84% !important; width: auto !important; scroll-snap-align: center; }
  .pe-desliza .reveal { opacity: 1 !important; transform: none !important; }
  .pe-desliza.pe-planes { align-items: stretch; }
  .pe-desliza .pe-plan { transform: none !important; padding: 28px 22px; }
  .pe-desliza .pe-obra-img img { aspect-ratio: 4/4.4 !important; }
  .pe-puntos { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 6px; }
  .pe-puntos button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 8px; background: #D6CCBA; transition: width .3s, background .3s; cursor: pointer; }
  .pe-puntos button.activo { width: 26px; background: var(--pe-oro); }
  .pe-oscuro .pe-puntos button { background: rgba(241, 236, 227, .25); }
  .pe-desliza-aviso { display: block; text-align: center; font-size: 13px; color: var(--pe-gris); margin-top: 8px; }
  .pe-desliza-aviso::after { content: " →"; display: inline-block; animation: pe-dedo 1.4s ease-in-out infinite; }
  @keyframes pe-dedo { 50% { transform: translateX(6px); } }

  /* Pestañas de planes */
  .pe-tabs { display: flex; gap: 6px; padding: 5px; margin: 0 0 16px; border-radius: 999px; background: #EDE6D9; }
  body.pd-estudio .pe-tabs button { flex: 1; padding: 11px 6px; border: 0; border-radius: 999px; background: none; font: 700 13.5px/1 var(--pe-texto); color: var(--pe-gris); cursor: pointer; transition: background .25s, color .25s; }
  body.pd-estudio .pe-tabs button.activo { background: var(--pe-tinta) !important; color: #fff !important; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); }

  /* Proceso como línea de tiempo que se ilumina */
  body.pd-con-elementor .pe-pasos.e-con { display: block; border-top: 0; position: relative; }
  body.pd-con-elementor .pe-pasos.e-con::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 30px; width: 2px; background: rgba(241, 236, 227, .14); }
  body.pd-con-elementor .pe-paso.e-con { position: relative; padding: 0 0 30px 66px !important; border: 0 !important; }
  .pe-paso-n { position: absolute !important; left: 0; top: 0; width: 44px !important; }
  .pe-paso-n .elementor-heading-title { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 15px !important; font-weight: 700; color: rgba(241, 236, 227, .55) !important; background: #1D1B18; border: 2px solid rgba(241, 236, 227, .18); transition: .4s; }
  .pe-paso.activo .pe-paso-n .elementor-heading-title { background: var(--pe-oro2); border-color: var(--pe-oro2); color: var(--pe-tinta) !important; box-shadow: 0 0 0 6px rgba(233, 194, 122, .15); }
  .pe-paso-h .elementor-heading-title { margin: 8px 0 6px !important; font-size: 21px !important; }
  .pe-paso { opacity: .55; transition: opacity .4s; }
  .pe-paso.activo { opacity: 1; }

  /* Datos del hero como fichas */
  body.pd-con-elementor .pe-datos.e-con { gap: 8px; border-top: 0; padding-top: 0; }
  body.pd-con-elementor .pe-dato.e-con { background: #fff; border: 1px solid var(--pe-linea); border-radius: 16px; padding: 12px 10px; }
  .pe-dato-n .elementor-heading-title { font-size: 15px !important; white-space: normal; }
  .pe-dato-t p { font-size: 11.5px !important; line-height: 1.35; margin: 2px 0 0; }
  body.pd-con-elementor .pe-acciones.e-con { --flex-direction: column; --align-items: stretch; }
  body.pd-con-elementor .pe-acciones .pe-btn .elementor-button { width: 100%; justify-content: center; }

  .pe-cinta.pe-cinta-o div { font-size: 18px; }
  .pe-h2 .elementor-heading-title { font-size: 31px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .pe-reco-q.activo, .pe-reco-res, .pe-faq details[open] p { animation: none; }
  .pe-desliza-aviso::after { animation: none; }
}

/* ---------- Compra con Mercado Pago ---------- */
.pe-plan-wa { display: block; text-align: center; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--pe-gris); text-decoration: underline; text-underline-offset: 3px; }
.pe-top .pe-plan-wa { color: rgba(255, 255, 255, .7); }
.pe-reco-res .r-compra { display: flex; justify-content: center; padding: 16px; border-radius: 999px; background: var(--pe-tinta); color: #fff; font-weight: 700; }
.pe-reco-res .r-compra:hover { background: #2a2622; color: #fff; }
.pe-reco-res .r-wa-2 { background: none; color: #1F7A45; border: 1.5px solid #1F9E55; }
.pe-reco-res .r-wa-2:hover { background: #EAF6EF; color: #1F7A45; }

body.pd-con-elementor .pe-compra-sec.e-con { --width: 100%; --padding-top: 130px; --padding-bottom: 90px; background: radial-gradient(60% 40% at 90% 0%, rgba(233, 194, 122, .25), transparent 70%), var(--pe-fondo); }
.pe-compra-h1 { font: 700 clamp(32px, 4vw, 48px)/1.05 var(--pe-titulo); letter-spacing: -.035em; color: var(--pe-tinta); margin: 8px 0 14px; }
.pe-compra-pasos { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 28px; flex-wrap: wrap; }
.pe-compra-pasos li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: #EDE6D9; font-size: 13.5px; font-weight: 600; color: var(--pe-gris); }
.pe-compra-pasos b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 12px; }
.pe-compra-pasos .activo { background: var(--pe-tinta); color: #fff; }
.pe-compra-pasos .activo b { background: var(--pe-oro2); color: var(--pe-tinta); }
.pe-compra-pasos .hecho b { background: #1F9E55; color: #fff; }
.pe-compra-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: start; }
.pe-compra-res { background: var(--pe-tinta); color: #fff; border-radius: 26px; padding: 32px 28px; position: sticky; top: 110px; }
.pe-compra-res .pe-tipo { color: var(--pe-oro2); }
.pe-compra-res .pe-compra-h1 { color: #fff; font-size: 34px; }
.pe-compra-res .pe-precio { font: 700 52px/1 var(--pe-titulo); letter-spacing: -.04em; margin: 6px 0 4px; }
.pe-compra-res .pe-precio small { font: 500 14px var(--pe-texto); color: rgba(255, 255, 255, .6); }
.pe-compra-res ul { list-style: none; padding: 0; margin: 20px 0; }
.pe-compra-res li { padding: 9px 0 9px 24px; border-top: 1px solid rgba(255, 255, 255, .12); position: relative; font-size: 14.5px; }
.pe-compra-res li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--pe-oro2); }
.pe-compra-nota { font-size: 13px; color: rgba(255, 255, 255, .6); }
.pe-compra-seguro { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-size: 13px; color: rgba(255, 255, 255, .8); }
.pe-compra-seguro svg { flex: 0 0 18px; color: var(--pe-oro2); }
body.pd-estudio .pe-compra-form .rc-form fieldset { background: #fff; border-color: var(--pe-linea); }
body.pd-estudio .pe-compra-form .rc-form legend { font: 700 22px var(--pe-titulo); color: var(--pe-tinta); }
body.pd-estudio .pe-compra-form .rc-form input:not([type=checkbox]), body.pd-estudio .pe-compra-form .rc-form textarea { background: var(--pe-fondo); color: var(--pe-tinta); border-color: var(--pe-linea); }
body.pd-estudio .pe-compra-form .rc-form label > span { color: var(--pe-gris); }
.pe-compra-btn { display: flex; width: 100%; justify-content: center; align-items: center; margin-top: 18px; padding: 18px 24px; border: 0; border-radius: 999px; background: var(--pe-tinta); color: #fff !important; font: 700 17px var(--pe-texto); cursor: pointer; transition: transform .15s, background .2s; }
.pe-compra-btn:hover { background: #2a2622; }
.pe-compra-btn:active { transform: scale(.98); }
.pe-compra-mini { margin-top: 12px; font-size: 13.5px; color: var(--pe-gris); text-align: center; }
.pe-compra-mini a { color: var(--pe-tinta); font-weight: 600; text-decoration: underline; }
.pe-compra-vacia, .pe-compra-ok { max-width: 640px; }
.pe-compra-ok p { color: var(--pe-gris); font-size: 17px; margin: 0 0 14px; }
.pe-compra-ok .pe-compra-btn { background: #1F9E55; width: auto; display: inline-flex; }
@media (max-width: 900px) {
  .pe-compra-grid { grid-template-columns: 1fr; }
  .pe-compra-res { position: static; padding: 24px 20px; }
  .pe-compra-res .pe-compra-h1 { font-size: 28px; }
  .pe-compra-res .pe-precio { font-size: 42px; }
  body.pd-con-elementor .pe-compra-sec.e-con { --padding-top: 104px; }
  .pe-compra-pasos li { font-size: 12px; padding: 6px 10px 6px 6px; }
}
body.pd-estudio .pe-compra-form .rc-form fieldset { padding: 26px 22px 22px !important; border-radius: 22px; margin: 0 0 18px; }
body.pd-estudio .pe-compra-form .rc-form legend { float: left; width: 100%; padding: 0; margin: 0 0 16px; }
body.pd-estudio .pe-compra-form .rc-form legend + * { clear: both; }
body.pd-estudio .pe-compra-form .rc-check { display: flex; gap: 10px; align-items: flex-start; }
body.pe-en-compra .pe-barra, body.pe-en-compra .chat-fab, body.pe-en-compra .wa-float { display: none !important; }
@media (max-width: 900px) { body.pd-estudio .pe-compra-form .rc-form fieldset { padding: 22px 16px 18px !important; } }

/* Colores fijos: el modo oscuro del celular no debe cambiar la web */
:root, html, body { color-scheme: light only; }
.chat-fab, .chat { display: none !important; }
