/* ======================================================
   GX121 · GLOW UP de GAMMA XG (estilo iOS: elegante, sutil y premium)
   - Botones con "tacto" de iPhone: se hunden con efecto resorte y una luz
     azul sigue al cursor dentro del botón.
   - Tarjetas de vidrio con reflejo arriba, foco de luz que sigue al cursor
     y elevación suave.
   - Aparición al bajar: de desenfocado a nítido, en cascada.
   - Formularios: transiciones suaves, check al completar bien un campo y
     pasos que se deslizan. Solo aspecto: no cambia campos, validación ni lógica.
   Todo se apaga si la persona pidió "reducir movimiento" en su dispositivo.
   ====================================================== */

:root {
    --gxg-spring: cubic-bezier(.34, 1.56, .64, 1);   /* resorte iOS */
    --gxg-ease: cubic-bezier(.22, 1, .36, 1);         /* salida suave */
}

/* ---------- Detalles generales iOS ---------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a, button, [role="button"], label, summary { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(59, 130, 246, .35); color: #fff; }
@media (hover: hover) and (pointer: fine) {
    html { scrollbar-width: thin; scrollbar-color: rgba(59, 130, 246, .45) transparent; }
}

/* ---------- 1) Botones con tacto iOS ---------- */
.gxg-btn {
    transition: background-color .35s var(--gxg-ease), border-color .35s var(--gxg-ease), color .35s var(--gxg-ease),
                box-shadow .45s var(--gxg-ease), transform .45s var(--gxg-ease), scale .55s var(--gxg-spring) !important;
    will-change: scale;
}
/* al presionar: se hunde y rebota al soltar (celular y computadora) */
.gxg-btn:active:not(:disabled):not(.gx-enviando) { scale: .955; transition-duration: .12s, .12s, .12s, .12s, .12s, .12s !important; }

@media (hover: hover) and (pointer: fine) {
    /* principal: al rellenarse, una luz blanca suave sigue al cursor */
    .gxg-btn.gxg-pri:not(:disabled):hover {
        background: radial-gradient(160px circle at var(--gxg-x, 50%) var(--gxg-y, 50%), rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 65%), #3b82f6 !important;
        box-shadow: 0 10px 34px -10px rgba(59, 130, 246, .75), 0 0 0 1px rgba(59, 130, 246, .35), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
    }
    /* secundario: un halo azul sigue al cursor */
    .gxg-btn.gxg-sec:hover {
        background: radial-gradient(160px circle at var(--gxg-x, 50%) var(--gxg-y, 50%), rgba(59, 130, 246, .22), rgba(59, 130, 246, 0) 70%), rgba(59, 130, 246, .06) !important;
    }
}

/* WhatsApp: respiración de luz muy suave y tacto resorte */
.wa-float, .chat-icon-circle-right { transition: transform .45s var(--gxg-ease), box-shadow .45s var(--gxg-ease), scale .55s var(--gxg-spring) !important; }
.wa-float:active, .chat-icon-circle-right:active { scale: .92; transition-duration: .12s !important; }
@media (prefers-reduced-motion: no-preference) {
    .wa-float { animation: gxgRespira 4.5s ease-in-out infinite; }
}
@keyframes gxgRespira {
    0%, 100% { box-shadow: 0 10px 30px -8px rgba(59, 130, 246, .55); }
    50%      { box-shadow: 0 10px 38px -6px rgba(59, 130, 246, .85), 0 0 0 8px rgba(59, 130, 246, .08); }
}

/* ---------- 2) Tarjetas de vidrio con luz ---------- */
.gxg-host { isolation: isolate; }
.gxg-host.gxg-rel { position: relative; }
/* reflejo de vidrio arriba (siempre) y foco que sigue al cursor (al pasar) */
.gxg-luz, .gxg-luz::after { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; }
.gxg-luz { background: linear-gradient(180deg, rgba(255, 255, 255, .055) 0%, rgba(255, 255, 255, 0) 28%); }
.gxg-luz::after {
    content: ""; z-index: 0; opacity: 0; transition: opacity .5s var(--gxg-ease);
    background: radial-gradient(420px circle at var(--gxg-x, 50%) var(--gxg-y, 50%), rgba(59, 130, 246, .16), rgba(59, 130, 246, .05) 38%, rgba(59, 130, 246, 0) 62%);
}
.gxg-host:hover > .gxg-luz::after { opacity: 1; }

/* elevación suave (sin "saltos" ni encogerse) */
.gxg-lift { transition: transform .6s var(--gxg-ease), border-color .45s ease, box-shadow .6s var(--gxg-ease), background-color .45s ease !important; }
@media (hover: hover) and (pointer: fine) {
    .gxg-lift:hover {
        border-color: rgba(59, 130, 246, .45) !important;
        box-shadow: 0 30px 60px -30px rgba(59, 130, 246, .5), 0 18px 40px -24px rgba(0, 0, 0, .6) !important;
    }
    /* portada: misma elevación suave para todas las tarjetas */
    .bento-item.gxg-lift:hover, .testimonio-card.gxg-lift:hover { transform: translateY(-6px) !important; }
    .price-card.gxg-lift:hover { transform: translateY(-8px) !important; }
    .price-card.featured.gxg-lift:hover { transform: translateY(-8px) scale(1.02) !important; }
    .testi-card.gxg-lift:hover, .gx-course.gxg-lift:hover { transform: translateY(-5px) !important; }
}

/* ---------- 3) Aparición al bajar: de desenfocado a nítido ---------- */
@media (prefers-reduced-motion: no-preference) {
    /* elementos con animación propia (AOS): se suma el desenfoque iOS */
    html.gxg-on [data-aos] { filter: blur(8px); transition-property: opacity, transform, filter !important; }
    html.gxg-on [data-aos].aos-animate { filter: none; }
    /* elementos sin animación propia */
    html.gxg-on .gxg-rv { opacity: 0; filter: blur(10px); transform: translate3d(0, 22px, 0) scale(.985);
        transition: opacity .9s var(--gxg-ease), transform .9s var(--gxg-ease), filter .9s var(--gxg-ease); transition-delay: var(--gxg-d, 0ms); }
    html.gxg-on .gxg-rv.gxg-in { opacity: 1; filter: none; transform: none; }
}

/* ---------- 4) Formularios con aspecto iOS (solo aspecto) ---------- */
.gxg-form input, .gxg-form select, .gxg-form textarea, .gxg-form .custom-select-trigger {
    transition: border-color .3s var(--gxg-ease), box-shadow .35s var(--gxg-ease), background-color .3s ease !important;
}
/* check animado al completar bien un campo */
.gxg-form input.gxg-ok {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%233b82f6'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 14px center !important; background-size: 18px 18px !important;
    padding-right: 42px !important;
}
@media (prefers-reduced-motion: no-preference) {
    .gxg-form input.gxg-ok-new { animation: gxgCheck .55s var(--gxg-spring); }
}
@keyframes gxgCheck { from { background-size: 0 0; } to { background-size: 18px 18px; } }

/* pasos que se deslizan como en las apps de Apple */
@media (prefers-reduced-motion: no-preference) {
    .gxg-form .gxg-paso { animation: gxgPaso .55s var(--gxg-ease) both; }
}
@keyframes gxgPaso {
    from { opacity: 0; transform: translate3d(18px, 0, 0); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- 5) Vidrio líquido estilo Apple (GX122, sutil) ---------- */
/* cabecera: al bajar, vidrio con el contenido difuminado detrás */
.gxg-cab { transition: background .5s var(--gxg-ease), box-shadow .5s var(--gxg-ease), -webkit-backdrop-filter .5s ease, backdrop-filter .5s ease; }
.gxg-cab.gxg-cab-on {
    background: linear-gradient(180deg, rgba(16, 31, 67, .62) 0%, rgba(10, 20, 44, .46) 100%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important; backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 34px -22px rgba(0, 0, 0, .85) !important;
}

/* cápsulas: ES/EN, Legales y botones secundarios */
.gxg-pildora.gxg-pildora {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 50%, rgba(255, 255, 255, .05) 100%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(255, 255, 255, .03), 0 8px 24px -14px rgba(0, 0, 0, .8);
}

/* paneles: menús y mensaje de WhatsApp */
.gxg-panel.gxg-panel {
    background-image: linear-gradient(160deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .03) 40%, rgba(255, 255, 255, .015) 100%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important; backdrop-filter: blur(28px) saturate(180%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 0 0 1px rgba(255, 255, 255, .035), 0 24px 48px -20px rgba(0, 0, 0, .75), 0 0 32px -12px rgba(59, 130, 246, .28) !important;
}
.gxp-menu.gxg-panel, .glass-menu.gxg-panel, .dropdown-content.gxg-panel { background-color: rgba(10, 20, 44, .74) !important; }

/* tarjetas: borde de luz, más brillante arriba a la izquierda */
.gxg-filo { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2; }
.gxg-filo::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .06) 30%, rgba(255, 255, 255, 0) 55%, rgba(147, 197, 253, .14) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------- 6) Listas desplegables en vidrio líquido (GX123, solo aspecto) ---------- */
/* listas: el mismo cristal de la barra de guías */
.custom-select-options.custom-select-options, .gx-tel-panel.gx-tel-panel, .gx-cs-options.gx-cs-options,
.side-dropdown.side-dropdown, .gxp-menu.gxp-menu, .glass-menu.glass-menu, .dropdown-content.dropdown-content {
    background-color: rgba(10, 20, 44, .97) !important;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .085) 0%, rgba(255, 255, 255, .02) 50%, rgba(255, 255, 255, .05) 100%) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    -webkit-backdrop-filter: blur(26px) saturate(180%) !important; backdrop-filter: blur(26px) saturate(180%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(255, 255, 255, .04), inset 0 0 24px rgba(255, 255, 255, .025),
                0 26px 54px -22px rgba(0, 0, 0, .9), 0 0 34px -14px rgba(59, 130, 246, .3) !important;
}
/* opción marcada o bajo el cursor: la burbuja azul clara de la barra de guías */
.custom-option.custom-option, .gx-tel-op.gx-tel-op, .gx-cs-option.gx-cs-option { border: 1px solid transparent; transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.custom-option.custom-option:hover, .custom-option.custom-option.highlighted, .gx-tel-op.gx-tel-op.hl, .gx-cs-option.gx-cs-option:hover, .gx-cs-option.gx-cs-option.hl, .gx-cs-option.gx-cs-option.highlighted {
    background: rgba(255, 255, 255, .06); color: #e2e8f0; border-color: rgba(255, 255, 255, .06);
}
.custom-option.custom-option.selected, .gx-tel-op.gx-tel-op.sel, .gx-cs-option.gx-cs-option.selected, .gx-cs-option.gx-cs-option[aria-selected="true"] {
    background: linear-gradient(135deg, rgba(96, 165, 250, .36) 0%, rgba(59, 130, 246, .13) 50%, rgba(99, 102, 241, .27) 100%);
    border-color: rgba(147, 197, 253, .5); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -6px 14px rgba(59, 130, 246, .2), 0 8px 22px -10px rgba(59, 130, 246, .7);
}
.gx-tel-op.gx-tel-op.sel .c { color: #dbeafe; }
.gxp-menu.gxp-menu a:hover, .gxp-menu.gxp-menu a:focus-visible, .glass-menu.glass-menu a:hover, .glass-menu.glass-menu a:focus-visible {
    background: linear-gradient(135deg, rgba(96, 165, 250, .26) 0%, rgba(59, 130, 246, .1) 50%, rgba(99, 102, 241, .2) 100%); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(147, 197, 253, .32);
}
.gx-tel-buscar.gx-tel-buscar input { background: rgba(255, 255, 255, .05) !important; border-color: rgba(255, 255, 255, .1) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }


/* ---------- Menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
    .gxg-btn, .gxg-lift, .wa-float { transition: none !important; animation: none !important; }
    .gxg-btn:active, .wa-float:active { scale: 1 !important; }
    .gxg-lift:hover { transform: none !important; }
}
