body.capa-abierta { overflow: hidden; }
[hidden] { display: none !important; }

.boton-aparicion {
  animation: aparecer-boton .6s .1s cubic-bezier(.22, 1, .36, 1) both;
}

.particulas {
  position: absolute;
  z-index: 1;
  inset: 0 48% 0 0;
  overflow: hidden;
  pointer-events: none;
}

.particulas span {
  position: absolute;
  width: 10px;
  height: 10px;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  background: var(--amarillo);
  opacity: .72;
  animation: flotar-punto 6s ease-in-out infinite;
}

.particulas span:nth-child(1) { left: 7%; top: 19%; width: 5px; height: 5px; }
.particulas span:nth-child(2) { left: 31%; top: 12%; background: #fff; animation-delay: -1.7s; }
.particulas span:nth-child(3) { left: 45%; top: 76%; width: 6px; height: 6px; animation-delay: -3.1s; }
.particulas span:nth-child(4) { left: 12%; top: 68%; background: #fff; animation-delay: -4.2s; }
.particulas span:nth-child(5) { left: 54%; top: 32%; width: 5px; height: 5px; animation-delay: -2.4s; }
.particulas span:nth-child(6) { left: 68%; top: 86%; background: #fff; width: 6px; height: 6px; animation-delay: -.8s; }

.hero-indicador {
  position: absolute;
  z-index: 2;
  top: 48px;
  left: clamp(340px, 34vw, 510px);
  width: clamp(90px, 8vw, 116px);
  overflow: visible;
  color: #8effc0;
  opacity: .74;
  pointer-events: none;
  transform: scaleX(-1) rotate(-6deg);
  transform-origin: center;
  animation: indicar-chiclayo 4.8s ease-in-out infinite;
}

.hero-indicador path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  vector-effect: non-scaling-stroke;
}

.indicador-avion { fill: rgba(78, 211, 154, .08); }
.indicador-estela { stroke-width: 2.2; stroke-dasharray: 38; animation: mover-estela 1.6s linear infinite; }

.acciones-flotantes {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1250;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.volver-arriba {
  width: 46px;
  height: 46px;
  border: 1px solid #ffd35d;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--amarillo);
  color: var(--verde-oscuro);
  box-shadow: 0 0 20px rgba(255, 195, 35, .35), 0 9px 22px rgba(3, 58, 53, .2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s, color .2s, background-color .2s;
}

.volver-arriba.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.volver-arriba:hover {
  background: var(--verde-oscuro);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 22px var(--boton-resplandor), 0 10px 25px rgba(3, 58, 53, .28);
}

.volver-arriba svg { width: 27px; height: 27px; stroke-width: 2.5; animation: subir-flecha 1.35s ease-in-out infinite; }

.panel-fondo {
  position: fixed;
  z-index: 1400;
  inset: 0;
  background: rgba(3, 31, 28, .62);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(2px);
  transition: opacity .3s, visibility .3s;
}

.panel-fondo.abierto { opacity: 1; visibility: visible; }

.panel-contacto {
  position: fixed;
  z-index: 1450;
  top: 0;
  right: 0;
  width: min(390px, 100%);
  height: 100dvh;
  padding: 50px 44px 35px;
  background: #fff;
  color: var(--texto);
  text-align: center;
  overflow-y: auto;
  box-shadow: -18px 0 45px rgba(3, 31, 28, .18);
  transform: translateX(102%);
  transition: transform .36s cubic-bezier(.22, 1, .36, 1);
}

.panel-contacto.abierto { transform: none; }
.panel-contacto section { margin-top: 34px; }
.panel-contacto h2 { margin: 0 0 20px; font: 700 20px "Montserrat", sans-serif; }
.panel-logo { width: 220px; height: 178px; margin: 0 auto 22px; object-fit: contain; background: #fff; }
.panel-presentacion { margin: 0 auto; max-width: 290px; color: #526763; font-size: 15px; line-height: 1.55; }
.cerrar-panel, .cerrar-modal {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--verde-oscuro);
  cursor: pointer;
}
.cerrar-panel svg, .cerrar-modal svg { width: 24px; height: 24px; stroke-width: 3; }
.cerrar-panel:hover, .cerrar-modal:hover { background: #f0f5f3; }

.panel-dato {
  width: fit-content;
  max-width: 100%;
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #526763;
  overflow-wrap: anywhere;
}
.panel-dato svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--amarillo-hover); }
.panel-dato[href^="mailto"] svg { fill: currentColor; stroke: none; }
.panel-direccion { display: block; max-width: 270px; margin: auto; color: #526763; line-height: 1.5; }
.panel-redes { margin-top: 26px; display: flex; justify-content: center; gap: 12px; }
.panel-redes a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--verde-oscuro); color: #fff; transition: background-color .2s, color .2s, transform .2s; }
.panel-redes a:hover { background: var(--amarillo); color: var(--verde-oscuro); transform: translateY(-2px); }
.panel-redes svg { width: 21px; height: 21px; }
.panel-redes #facebookPanel svg { width: 15px; height: 22px; fill: currentColor; stroke: none; }

.redes a, .panel-redes a {
  width: 42px;
  height: 42px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .06), 0 6px 15px rgba(0, 24, 21, .18);
  transition: background-color .22s, color .22s, box-shadow .22s, transform .22s;
}

.redes a:hover, .panel-redes a:hover {
  background: var(--amarillo);
  color: var(--verde-oscuro);
  box-shadow: 0 0 0 6px rgba(255, 195, 35, .18), 0 0 22px rgba(255, 195, 35, .6), 0 8px 18px rgba(0, 26, 23, .22);
  animation: agitar-red-social .55s ease-in-out;
}

@keyframes agitar-red-social {
  0%, 100% { transform: translateY(-2px) rotate(0); }
  20% { transform: translateY(-2px) rotate(-8deg) scale(1.05); }
  40% { transform: translateY(-2px) rotate(7deg) scale(1.05); }
  60% { transform: translateY(-2px) rotate(-5deg) scale(1.04); }
  80% { transform: translateY(-2px) rotate(3deg) scale(1.02); }
}

.modal-asesoria {
  width: min(690px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--texto);
  background: #fff;
  box-shadow: 0 24px 70px rgba(3, 31, 28, .28);
  overflow-y: auto;
}
.modal-asesoria::backdrop { background: rgba(3, 31, 28, .7); backdrop-filter: blur(3px); }
.modal-asesoria[open] { animation: abrir-modal .3s cubic-bezier(.22, 1, .36, 1); }
.formulario-cabecera { padding: 24px 34px 20px; display: flex; align-items: center; gap: 14px; background: var(--verde-oscuro); color: #fff; }
.formulario-icono { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: grid; place-items: center; background: var(--amarillo); color: var(--verde-oscuro); }
.formulario-icono svg { width: 21px; height: 21px; stroke-width: 2.2; }
.formulario-icono-whatsapp svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.formulario-etiqueta { color: var(--amarillo); font: 700 11px "Montserrat", sans-serif; }
.formulario-cabecera h2 { margin: 6px 0 5px; font: 700 24px "Montserrat", sans-serif; }
.formulario-cabecera p { margin: 0; color: rgba(255, 255, 255, .76); font-size: 14px; }
.reunion-cabecera { background: #0b704f; }
.reunion-cabecera .formulario-icono { background: #fff; color: #0b704f; }
.reunion-cabecera .formulario-etiqueta { color: #b9f2d8; }
.modal-asesoria .cerrar-modal { color: #fff; }
.modal-asesoria .cerrar-modal:hover { background: rgba(255, 255, 255, .1); }
.modal-asesoria form { padding: 21px 34px 26px; }
.campo-trampa { position: absolute; left: -9999px; }
.bloque-formulario { min-width: 0; margin: 0; padding: 0 0 17px; border: 0; }
.bloque-formulario + .bloque-formulario { padding-top: 16px; border-top: 1px solid #e3ebe8; }
.bloque-formulario legend { margin-bottom: 11px; color: var(--verde-oscuro); font: 700 14px "Montserrat", sans-serif; }
.tipo-solicitante { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tipo-solicitante input { position: absolute; opacity: 0; pointer-events: none; }
.tipo-solicitante label span { min-height: 42px; padding: 8px 13px; border: 1px solid #ccd9d5; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 700; transition: border-color .2s, background-color .2s, color .2s; }
.tipo-solicitante label svg { width: 18px; height: 18px; }
.tipo-solicitante input:checked + span { border-color: var(--verde-medio); background: #eaf5f1; color: var(--verde-oscuro); box-shadow: inset 0 0 0 1px var(--verde-medio); }
.tipo-solicitante input:focus-visible + span { outline: 3px solid #70d8c4; outline-offset: 2px; }
.formulario-paso { display: none; }
.formulario-paso.activo { display: block; animation: revelar-paso .3s ease; }
.formulario-paso fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.formulario-paso legend { margin-bottom: 22px; font: 700 17px "Montserrat", sans-serif; }
.formulario-paso legend span { width: 29px; height: 29px; margin-right: 8px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--amarillo); color: var(--verde-oscuro); }
.servicios-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.servicios-opciones input, .tipo-cliente input { position: absolute; opacity: 0; pointer-events: none; }
.servicios-opciones label span { min-height: 52px; padding: 12px 15px; border: 1px solid #dfe9e6; border-radius: 7px; display: flex; align-items: center; background: #f8faf9; cursor: pointer; font-weight: 700; transition: border-color .2s, background-color .2s, color .2s; }
.servicios-opciones input:checked + span { border-color: var(--verde-medio); background: var(--verde-oscuro); color: #fff; box-shadow: inset 4px 0 0 var(--amarillo); }
.servicios-opciones input:focus-visible + span, .tipo-cliente input:focus-visible + span { outline: 3px solid #70d8c4; outline-offset: 2px; }
.formulario-siguiente { min-width: 180px; margin: 24px 0 0 auto; display: flex; }
.formulario-siguiente:disabled { opacity: .45; pointer-events: none; }
.tipo-cliente { width: fit-content; margin-bottom: 20px; padding: 4px; border-radius: 7px; display: flex; background: #edf3f1; }
.tipo-cliente label span { min-width: 105px; padding: 8px 18px; border-radius: 5px; display: block; text-align: center; cursor: pointer; font-weight: 700; }
.tipo-cliente input:checked + span { background: #fff; color: var(--verde-oscuro); box-shadow: 0 2px 8px rgba(3, 58, 53, .12); }
.campos-formulario { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.campos-formulario label { display: flex; flex-direction: column; gap: 5px; color: #36544f; font-size: 13px; font-weight: 700; }
.campos-formulario small { font-weight: 400; }
.campos-formulario b, .aceptacion b { color: #d82f2f; }
.campos-formulario input, .campos-formulario textarea, .campos-formulario select { width: 100%; border: 1px solid #cddbd7; border-radius: 7px; padding: 9px 11px; background: #fff; color: var(--texto); font: 600 14px "Nunito Sans", sans-serif; resize: vertical; }
.campos-formulario input, .campos-formulario select { min-height: 40px; }
.campos-formulario textarea { min-height: 72px; }
.campos-formulario select { cursor: pointer; }
.campos-formulario input:focus, .campos-formulario textarea:focus, .campos-formulario select:focus { outline: 0; border-color: var(--verde-medio); box-shadow: 0 0 0 3px rgba(14, 90, 80, .12); }
.campos-formulario input.invalido, .campos-formulario textarea.invalido, .campos-formulario select.invalido { border-color: #d82f2f; background: #fffafa; box-shadow: 0 0 0 3px rgba(216, 47, 47, .08); }
.campo-error { min-height: 0; color: #bf2727; font-size: 12px; font-weight: 700; line-height: 1.3; }
.campo-error:not(:empty) { min-height: 16px; }
.campo-ancho { grid-column: 1 / -1; }
.aceptacion { margin-top: 2px; display: flex; align-items: flex-start; gap: 9px; color: #4b625e; font-size: 13px; line-height: 1.45; cursor: pointer; }
.aceptacion input { margin-top: 3px; accent-color: var(--verde-medio); }
.aceptacion a { color: var(--verde-medio); font-weight: 800; text-decoration: underline; }
.error-aceptacion { display: block; margin: 4px 0 0 24px; }
.boton-envio { width: 100%; margin-top: 15px; }
.turnstile-seguridad { width: 100%; margin-top: 15px; text-align: center; }
.turnstile-widget { width: 100%; min-height: 65px; }
.turnstile-widget iframe { max-width: 100%; }
.error-turnstile { display: block; margin-top: 6px; }
.seguridad-formulario { margin: 11px 0 0; color: #738581; font-size: 12px; text-align: center; }
.aviso-reunion { margin: 15px 0; padding: 11px 13px; border: 1px solid #c7ead9; border-radius: 7px; display: flex; align-items: flex-start; gap: 10px; background: #ecf8f2; color: #176c4e; }
.aviso-reunion > svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; }
.aviso-reunion p { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.aviso-reunion span { font-size: 13px; line-height: 1.4; }
.formulario-acciones { margin-top: 24px; display: flex; justify-content: flex-end; gap: 12px; }
.formulario-atras { border-color: #cddbd7; background: #fff; color: var(--verde-oscuro); }
.formulario-resultado { margin-top: 18px; font-weight: 700; text-align: center; }
.formulario-resultado.error { color: #a32828; }
.formulario-resultado.exito { padding: 14px; border-radius: 7px; background: #e8f7ef; color: #12643d; }

@keyframes aparecer-boton {
  from { opacity: .65; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes flotar-punto {
  0%, 100% { transform: translate(0, 0); opacity: .35; }
  50% { transform: translate(10px, -18px); opacity: .9; }
}
@keyframes abrir-modal {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes revelar-paso {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes indicar-chiclayo {
  0%, 18%, 100% { transform: scaleX(-1) rotate(-6deg) translate(0, 0); }
  28% { transform: scaleX(-1) rotate(-5deg) translate(4px, 1px); }
  40% { transform: scaleX(-1) rotate(-8deg) translate(8px, 4px); }
  52% { transform: scaleX(-1) rotate(-6deg) translate(3px, 2px); }
  66% { transform: scaleX(-1) rotate(-6deg) translate(0, 0); }
}
@keyframes mover-estela {
  to { stroke-dashoffset: -76; }
}
@keyframes subir-flecha {
  0%, 100% { transform: translateY(3px); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 1120px) {
  .hero-indicador { top: 52px; left: clamp(390px, 48vw, 560px); width: 96px; opacity: .7; }
  .controles-movil { display: flex; }
  .controles-movil .boton-cuadricula { width: 48px; height: 48px; display: grid; }
}

@media (max-width: 720px) {
  .particulas { inset: 0; }
  .hero-indicador { top: 112px; right: 20px; left: auto; width: 84px; opacity: .66; }
  .acciones-flotantes { right: 16px; bottom: 16px; gap: 9px; }
  .whatsapp-flotante, .volver-arriba { width: 48px; height: 48px; }
  .panel-contacto { padding: 46px 25px 28px; }
  .panel-logo { width: 190px; height: 150px; }
  .modal-asesoria { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .formulario-cabecera { padding: 24px 20px 20px; }
  .formulario-icono { width: 42px; height: 42px; flex-basis: 42px; }
  .formulario-cabecera h2 { padding-right: 24px; font-size: 23px; }
  .formulario-cabecera p { font-size: 14px; line-height: 1.4; }
  .modal-asesoria form { padding: 21px 18px 26px; }
  .servicios-opciones, .campos-formulario { grid-template-columns: 1fr; }
  .tipo-solicitante { gap: 8px; }
  .tipo-solicitante label span { min-height: 46px; padding: 8px; gap: 6px; font-size: 14px; }
  .tipo-solicitante label svg { width: 18px; height: 18px; }
  .campos-formulario { gap: 13px; }
  .campos-formulario label { font-size: 14px; }
  .campos-formulario input, .campos-formulario textarea, .campos-formulario select { padding: 11px 12px; font-size: 15px; }
  .campos-formulario input, .campos-formulario select { min-height: 44px; }
  .aceptacion { font-size: 14px; }
  .boton-envio { min-height: 52px; font-size: 16px; }
  .campo-ancho { grid-column: auto; }
  .formulario-siguiente { width: 100%; }
  .formulario-acciones { flex-direction: column-reverse; }
  .formulario-acciones .boton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .boton-aparicion, .hero h1 em::after, .particulas span, .modal-asesoria[open], .hero-indicador, .indicador-estela, .volver-arriba svg, .redes a, .panel-redes a { animation: none; }
  .hero h1 em::after { transform: rotate(-2deg) scaleX(1); }
}


/* CONSISTENCIA ENCABEZADO Y BOTON 07-08-2026 */
.encabezado {
  position: relative;
  z-index: 1500;
}
.volver-arriba,
.volver-arriba:hover,
.volver-arriba:focus,
.volver-arriba:active {
  background: var(--amarillo);
  color: var(--verde-oscuro);
  border-color: #ffd35d;
}
@media (max-width: 720px) {
  .volver-arriba,
  .volver-arriba:hover,
  .volver-arriba:focus,
  .volver-arriba:active {
    background: var(--amarillo) !important;
    color: var(--verde-oscuro) !important;
    border-color: #ffd35d !important;
  }
}


/* =========================================================
   PANEL DE CONTACTO — CORRECCIÓN MÓVIL
   Al abrir el botón de puntos, el panel cubre el encabezado.
   El encabezado vuelve a su comportamiento normal al cerrar.
   ========================================================= */
body.capa-abierta .encabezado {
  z-index: 100 !important;
}

body.capa-abierta .encabezado.fijo .menu-envuelto {
  position: relative !important;
  inset: auto !important;
  box-shadow: none !important;
}

body.capa-abierta .panel-fondo {
  z-index: 1650 !important;
}

body.capa-abierta .panel-contacto {
  z-index: 1700 !important;
}

.panel-logo-enlace {
  width: fit-content;
  margin: 0 auto;
  display: block;
  border-radius: 50%;
}

.panel-logo-enlace:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 4px;
}
