/* ============================================================
   Portal publico de SS_Systems (inicio, registro, pago).
   Colores literales (NO variables CSS: NetBeans las marca como error en este proyecto). Paleta: la del sistema (azul #1f4fa8).
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body.p-cuerpo {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px; line-height: 1.55; color: #1b2330; background: #f6f8fc;
    -webkit-font-smoothing: antialiased;
}
body.p-cuerpo > main { flex: 1 0 auto; }
img { max-width: 100%; }
a { color: #1f4fa8; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: #15213a; }
p { margin: 0 0 12px; }
.p-ancho { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.p-solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.p-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Barra superior ---------- */
.p-barra { position: sticky; top: 0; z-index: 50; background: #ffffff; border-bottom: 1px solid #d6dce5; }
.p-barra-int { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.p-marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #15213a; font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.p-marca img { border-radius: 50%; display: block; }
.p-nav { display: none; gap: 26px; }
.p-nav a { text-decoration: none; color: #2c3647; font-weight: 600; font-size: 15px; }
.p-nav a:hover { color: #1f4fa8; }
.p-acciones { display: flex; align-items: center; gap: 8px; }
.p-acciones .p-btn { white-space: nowrap; }
.p-solo-chico { display: none; }

/* ---------- Menu de contacto (barra superior) ---------- */
.p-contacto { position: relative; }
.p-contacto > summary { list-style: none; cursor: pointer; }
.p-contacto > summary::-webkit-details-marker { display: none; }
/* como menu de la barra (al lado de Preguntas): se ve igual que los demas enlaces, con una flechita */
.p-nav .p-contacto > summary { display: inline-flex; align-items: center; gap: 7px; color: #2c3647; font-weight: 600; font-size: 15px; }
.p-nav .p-contacto > summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.p-nav .p-contacto[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.p-nav .p-contacto > summary:hover, .p-nav .p-contacto[open] > summary { color: #1f4fa8; }
.p-nav .p-contacto > summary:focus-visible { outline: 3px solid rgba(31, 79, 168, .45); outline-offset: 4px; border-radius: 4px; }
/* en pantallas chicas el menu de la barra no se muestra: queda un icono de telefono (con el mismo cuadro) junto a los botones */
.p-contacto-icono { display: none; }
.p-contacto-icono[open] > summary { background: #eef3fb; border-color: #1f4fa8; }
.p-contacto-boton { width: 18px; height: 18px; flex: none; }
.p-contacto-caja {
    position: absolute; left: 0; top: calc(100% + 14px); z-index: 60; width: 310px; padding: 8px;
    background: #ffffff; border: 1px solid #d6dce5; border-radius: 12px; box-shadow: 0 14px 36px rgba(21, 33, 58, .18); cursor: default;
}
.p-contacto-icono .p-contacto-caja { left: auto; right: 0; top: calc(100% + 10px); }
.p-contacto-caja a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #15213a; text-decoration: none; }
.p-contacto-caja a:hover, .p-contacto-caja a:focus-visible { background: #eef3fb; outline: none; }
.p-contacto-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: #e8efff; color: #1f4fa8; }
.p-contacto-ico svg { width: 20px; height: 20px; }
.p-contacto-caja small { display: block; font-size: 12px; line-height: 1.2; color: #5d6878; }
.p-contacto-caja strong { display: block; font-size: 15px; line-height: 1.3; color: #15213a; word-break: break-word; }

/* ---------- Botones ---------- */
.p-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 8px;
    font: inherit; font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.p-btn:focus-visible { outline: 3px solid rgba(31, 79, 168, .45); outline-offset: 2px; }
.p-btn-primario { background: #1f4fa8; color: #ffffff; border-color: #1f4fa8; }
.p-btn-primario:hover:not(:disabled) { background: #173d84; border-color: #173d84; }
.p-btn-linea { background: #ffffff; color: #1f4fa8; border-color: #c3cbd8; }
.p-btn-linea:hover:not(:disabled) { background: #eef3fb; border-color: #1f4fa8; }
.p-btn-claro { background: #ffffff; color: #15213a; border-color: #ffffff; }
.p-btn-claro:hover:not(:disabled) { background: #eef3fb; }
.p-btn-borde { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, .55); }
.p-btn-borde:hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: #ffffff; }
.p-btn-grande { min-height: 52px; padding: 0 28px; font-size: 17px; }
.p-btn-ancho { width: 100%; }
.p-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Aviso de lanzamiento (WEB-INF/jspf/portalPromo.jspf) ---------- */
.p-promo { background: linear-gradient(90deg, #ffd54a 0%, #ffb300 100%); color: #1b2330; border-bottom: 1px solid #e0a000; }
.p-promo-int { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; padding-top: 11px; padding-bottom: 11px; }
.p-promo-int.p-ancho { max-width: 1280px; }
@media (min-width: 1280px) { .p-promo-int { flex-wrap: nowrap; } }
.p-promo-etiqueta { background: #15213a; color: #ffd54a; font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.p-promo-texto { margin: 0; font-size: 15.5px; line-height: 1.4; text-align: center; text-wrap: balance; }
.p-promo-texto strong { font-weight: 800; }
.p-promo-boton { background: #15213a; color: #ffffff; text-decoration: none; font-weight: 700; font-size: 14px; padding: 7px 16px; border: 1px solid #15213a; border-radius: 8px; white-space: nowrap; }
.p-promo-boton:hover { background: #1f4fa8; border-color: #1f4fa8; }
.p-promo-boton:focus-visible { outline: 3px solid rgba(21, 33, 58, .55); outline-offset: 2px; }

/* ---------- Portada ---------- */
.p-hero { background: linear-gradient(160deg, #15213a 0%, #1f4fa8 100%); color: #ffffff; padding: 56px 0 64px; overflow: hidden; }
.p-hero-int { display: grid; gap: 40px; align-items: center; }
.p-hero h1 { color: #ffffff; font-size: 34px; letter-spacing: -.3px; margin-bottom: 16px; }
.p-hero .p-lema { font-size: 18px; color: #dbe5f7; max-width: 560px; margin-bottom: 26px; }
.p-hero-botones { display: flex; flex-wrap: wrap; gap: 12px; }
.p-hero-nota { margin-top: 18px; font-size: 14px; color: #b9c9e6; }
.p-hero-firma { margin-top: 6px; }
.p-hero-firma strong { color: #ffffff; font-weight: 600; }
.p-hero-logo { display: flex; justify-content: center; }
.p-hero-logo img { width: min(280px, 70vw); height: auto; border-radius: 50%; box-shadow: 0 0 0 10px rgba(255, 255, 255, .10), 0 24px 60px rgba(0, 0, 0, .35); }

/* ---------- Secciones ---------- */
.p-seccion { padding: 60px 0; }
.p-seccion.p-blanca { background: #ffffff; border-top: 1px solid #e3e8f0; border-bottom: 1px solid #e3e8f0; }
.p-cabeza { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.p-cabeza h2 { font-size: 28px; margin-bottom: 10px; }
.p-cabeza p { color: #5d6878; font-size: 17px; margin: 0; }

.p-funciones { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.p-func { background: #ffffff; border: 1px solid #d6dce5; border-radius: 12px; padding: 22px; }
.p-seccion.p-blanca .p-func { background: #f6f8fc; }
.p-func .p-icono { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: #eef3fb; color: #1f4fa8; margin-bottom: 14px; }
.p-func .p-icono svg { width: 26px; height: 26px; }
.p-func h3 { font-size: 18px; margin-bottom: 6px; }
.p-func p { color: #5d6878; font-size: 15px; margin: 0; }

.p-pasos { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: paso; }
.p-paso { position: relative; background: #ffffff; border: 1px solid #d6dce5; border-radius: 12px; padding: 22px 22px 22px 74px; }
.p-paso::before {
    counter-increment: paso; content: counter(paso);
    position: absolute; left: 20px; top: 22px; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: #1f4fa8; color: #ffffff; font-weight: 700; font-size: 18px;
}
.p-paso h3 { font-size: 18px; margin-bottom: 4px; }
.p-paso p { color: #5d6878; font-size: 15px; margin: 0; }

/* ---------- Precio ---------- */
/* varios planes: uno al lado del otro (en el celular, uno debajo del otro) */
.p-planes { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; align-items: stretch; }
.p-planes .p-precio { flex: 1 1 340px; margin: 0; display: flex; flex-direction: column; }
.p-planes .p-precio ul { flex: 1; }
/* plan anunciado, todavia sin poderse contratar */
.p-precio-pronto { border-style: dashed; }
.p-pronto { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: #fdf6e7; color: #9a6a12; font-size: 11px; letter-spacing: .5px; vertical-align: middle; }
.p-precio { max-width: 460px; margin: 0 auto; background: #ffffff; border: 2px solid #1f4fa8; border-radius: 16px; padding: 30px 28px; text-align: center; box-shadow: 0 18px 40px rgba(31, 79, 168, .12); }
.p-precio .p-plan { font-weight: 700; color: #1f4fa8; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; }
.p-precio .p-monto { font-size: 54px; font-weight: 700; color: #15213a; line-height: 1.1; margin: 8px 0 2px; }
.p-precio .p-monto small { font-size: 18px; font-weight: 600; color: #5d6878; }
.p-precio .p-periodo { color: #5d6878; margin-bottom: 20px; }
.p-precio ul { list-style: none; margin: 0 0 24px; padding: 0; text-align: left; }
.p-precio li { position: relative; padding: 7px 0 7px 30px; border-top: 1px solid #eef1f6; font-size: 15px; }
.p-precio li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 16px; height: 9px; border-left: 3px solid #1d7d52; border-bottom: 3px solid #1d7d52; transform: rotate(-45deg); }
.p-precio .p-pago-nota { margin: 14px 0 0; font-size: 13px; color: #5d6878; }

/* ---------- Preguntas ---------- */
.p-preguntas { max-width: 780px; margin: 0 auto; }
.p-preguntas details { background: #ffffff; border: 1px solid #d6dce5; border-radius: 10px; margin-bottom: 10px; }
.p-preguntas summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: #15213a; list-style: none; position: relative; padding-right: 48px; }
.p-preguntas summary::-webkit-details-marker { display: none; }
.p-preguntas summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 24px; color: #1f4fa8; line-height: 1.2; }
.p-preguntas details[open] summary::after { content: "\2212"; }
.p-preguntas summary:focus-visible { outline: 3px solid rgba(31, 79, 168, .45); outline-offset: 2px; border-radius: 10px; }
.p-preguntas details p { padding: 0 20px 16px; margin: 0; color: #3b4658; }

/* ---------- Franja final ---------- */
.p-cta { background: #15213a; color: #ffffff; text-align: center; padding: 52px 0; }
.p-cta h2 { color: #ffffff; font-size: 26px; margin-bottom: 10px; }
.p-cta p { color: #c9d3e6; margin-bottom: 22px; }

/* ---------- Pie ---------- */
.p-pie { flex-shrink: 0; background: #0f1830; color: #aebbd4; font-size: 14px; padding: 28px 0; }
.p-pie-int { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.p-pie a { color: #dbe5f7; text-decoration: none; margin-right: 18px; }
.p-pie a:hover { text-decoration: underline; }
.p-pie a:last-child { margin-right: 0; }
.p-pie-sub { margin-top: 2px; font-size: 13px; color: #8d9bb8; }

/* ---------- Formularios (registro y pago) ---------- */
.p-pagina { padding: 40px 0 56px; }
.p-tarjeta { width: 100%; max-width: 600px; margin: 0 auto; background: #ffffff; border: 1px solid #d6dce5; border-radius: 14px; padding: 28px; box-shadow: 0 10px 30px rgba(21, 33, 58, .06); }
.p-tarjeta + .p-tarjeta { margin-top: 20px; }
.p-tarjeta h1 { font-size: 26px; margin-bottom: 6px; }
.p-tarjeta h2 { font-size: 19px; margin-bottom: 8px; }
.p-tarjeta .p-intro { color: #5d6878; margin-bottom: 22px; }
.p-campo { margin-bottom: 16px; }
.p-campo label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #2c3647; }
.p-campo label .p-opc { font-weight: 400; color: #5d6878; }
.p-campo input[type="text"], .p-campo input[type="email"], .p-campo input[type="tel"], .p-campo input[type="number"] {
    width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #b8c1d0; border-radius: 8px; background: #ffffff; font: inherit; color: #1b2330;
}
.p-campo select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #b8c1d0; border-radius: 8px; background: #ffffff; font: inherit; color: #1b2330; }
.p-campo input:focus, .p-campo select:focus { outline: none; border-color: #1f4fa8; box-shadow: 0 0 0 3px rgba(31, 79, 168, .25); }
.p-ayuda { margin: 6px 0 0; font-size: 13px; color: #5d6878; }
.p-fila { display: grid; gap: 0 16px; }
.p-check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 18px; font-size: 14px; color: #2c3647; }
.p-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; }
.p-alerta { padding: 12px 14px; border-radius: 8px; border: 1px solid; margin-bottom: 18px; font-size: 15px; }
.p-alerta.error { background: #fbeeed; border-color: #efc1bc; color: #b83227; }
.p-alerta.aviso { background: #fdf6e7; border-color: #efd9a8; color: #7d540c; }
.p-alerta.ok { background: #e9f6ef; border-color: #b8e0cb; color: #176a45; }
.p-alerta[hidden] { display: none; }
.p-pie-form { margin-top: 14px; text-align: center; font-size: 14px; color: #5d6878; }
details.p-continuar { max-width: 600px; margin: 20px auto 0; background: #ffffff; border: 1px solid #d6dce5; border-radius: 12px; }
details.p-continuar summary { cursor: pointer; padding: 16px 22px; font-weight: 600; color: #1f4fa8; }
details.p-continuar .p-cont-cuerpo { padding: 0 22px 20px; }

/* ---------- Pago ---------- */
.p-resumen { border: 1px solid #d6dce5; border-radius: 10px; margin-bottom: 20px; overflow: hidden; }
.p-resumen div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1px solid #eef1f6; font-size: 15px; }
.p-resumen div:first-child { border-top: 0; }
.p-resumen span:first-child { color: #5d6878; }
.p-resumen .p-total { background: #f6f8fc; font-weight: 700; font-size: 17px; }
.p-metodos { display: grid; gap: 10px; margin-bottom: 20px; }
.p-metodo { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid #d6dce5; border-radius: 10px; cursor: pointer; background: #ffffff; }
.p-metodo:hover { border-color: #9fb3d9; }
.p-metodo input { position: absolute; opacity: 0; pointer-events: none; }
.p-metodo .p-radio { width: 20px; height: 20px; border: 2px solid #8794a8; border-radius: 50%; flex: 0 0 auto; position: relative; }
.p-metodo input:checked ~ .p-radio { border-color: #1f4fa8; }
.p-metodo input:checked ~ .p-radio::after { content: ""; position: absolute; top: 3px; right: 3px; bottom: 3px; left: 3px; border-radius: 50%; background: #1f4fa8; }
.p-metodo input:focus-visible ~ .p-radio { outline: 3px solid rgba(31, 79, 168, .45); outline-offset: 2px; }
.p-metodo.sel { border-color: #1f4fa8; background: #f3f7fd; }
.p-metodo strong { display: block; font-size: 16px; }
.p-metodo small { color: #5d6878; }
.p-seguro { margin-top: 14px; font-size: 13px; color: #5d6878; text-align: center; }
.p-espera { text-align: center; padding: 8px 0 4px; }
.p-rueda { width: 44px; height: 44px; margin: 0 auto 16px; border: 4px solid #d6dce5; border-top-color: #1f4fa8; border-radius: 50%; animation: p-gira 0.9s linear infinite; }
@keyframes p-gira { to { transform: rotate(360deg); } }
.p-exito { text-align: center; }
.p-exito .p-ok { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #e9f6ef; display: flex; align-items: center; justify-content: center; }
.p-exito .p-ok svg { width: 34px; height: 34px; color: #1d7d52; }

/* ---------- Pasarela de prueba ---------- */
.p-prueba-banda { background: #fdf6e7; color: #7d540c; border-bottom: 1px solid #efd9a8; text-align: center; padding: 10px 16px; font-weight: 600; font-size: 14px; }
.p-tarjeta-prueba { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.p-tarjeta-prueba .p-campo.p-completo { grid-column: 1 / -1; }
#botonGoogle { min-height: 48px; display: flex; justify-content: center; margin: 6px 0 14px; }

/* ---------- Texto legal ---------- */
.p-legal { max-width: 780px; margin: 0 auto; background: #ffffff; border: 1px solid #d6dce5; border-radius: 14px; padding: 30px; }
.p-legal h1 { font-size: 28px; margin-bottom: 14px; }
.p-legal h2 { font-size: 19px; margin: 22px 0 6px; }
.p-legal li { margin-bottom: 4px; }

/* ---------- Pantallas anchas ---------- */
@media (min-width: 640px) {
    .p-fila.p-dos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) {
    .p-contacto-icono { display: block; }
}
@media (min-width: 900px) {
    .p-nav { display: flex; }
    .p-hero { padding: 84px 0 92px; }
    .p-hero-int { grid-template-columns: 1.15fr .85fr; }
    .p-hero h1 { font-size: 46px; }
    .p-seccion { padding: 76px 0; }
    .p-cabeza h2 { font-size: 34px; }
}
@media (max-width: 480px) {
    .p-solo-grande { display: none; }
    .p-solo-chico { display: inline; }
    .p-barra-int { gap: 8px; }
    .p-marca { gap: 8px; }
    .p-marca span { font-size: 17px; }
    .p-acciones .p-btn { padding: 0 12px; min-height: 40px; font-size: 14px; }
    .p-contacto-icono { position: static; }   /* la caja se ancla a la barra (no al boton) para que no se salga de la pantalla */
    .p-contacto-icono .p-contacto-caja { left: 12px; right: 12px; top: 68px; width: auto; position: fixed; }
    .p-tarjeta { padding: 22px 18px; }
    .p-tarjeta-prueba { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .p-marca span { display: none; }   /* con el boton de contacto no cabe el nombre junto a los botones: queda el logo */
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .p-rueda { animation: none; }
}
