/* ============================================================
   GlobalSoftServer — styles.css
   Paleta oscura con acentos azul/cian degradados
   ============================================================ */

:root {
  --bg: #0a0f1e;
  --bg-alt: #0f1730;
  --surface: #141d3a;
  --surface-hover: #1a2547;
  --border: #24304f;
  --text: #e6ecf7;
  --text-muted: #94a3c4;
  --accent: #2f7bff;
  --accent-2: #22d3ee;
  --gradient: linear-gradient(135deg, #2f7bff 0%, #22d3ee 100%);
  --danger: #ff5d73;
  --success: #34d399;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* El atributo hidden siempre oculta, aunque el elemento tenga display:flex/grid */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

.contenedor {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* ---------- Utilidades ---------- */
.texto-degradado {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.seccion { padding: 5.5rem 0; }
.seccion-alt { background: var(--bg-alt); }

.titulo-seccion {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  text-align: center;
  margin-bottom: .6rem;
}

.subtitulo-seccion {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 15, 30, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-interior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo svg { flex-shrink: 0; }

.nav-enlaces {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
}

.nav-enlaces a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
  transition: color .25s;
}

.nav-enlaces a:hover { color: var(--accent-2); }

.nav-cta {
  background: var(--gradient);
  color: #fff !important;
  padding: .34rem .8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .82rem;
}

.nav-cta:hover { opacity: .9; }

/* Botón hamburguesa (oculto en escritorio) */
.boton-menu {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .4rem;
}

.boton-menu span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.boton-menu.abierto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.boton-menu.abierto span:nth-child(2) { opacity: 0; }
.boton-menu.abierto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 11rem 0 7rem;
  text-align: center;
  overflow: hidden;
}

/* Resplandores decorativos */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .28;
  pointer-events: none;
}

.hero::before {
  width: 480px; height: 480px;
  background: var(--accent);
  top: -140px; left: -120px;
}

.hero::after {
  width: 420px; height: 420px;
  background: var(--accent-2);
  bottom: -160px; right: -100px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.15;
  max-width: 820px;
  margin: 0 auto 1.2rem;
}

.hero p {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 620px;
  margin: 0 auto 2.2rem;
}

.hero-acciones {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Carrusel del hero (tecnología / servicios) — diseño premium
   ============================================================ */
.hero-carrusel {
  position: relative;
  max-width: 1040px;
  margin: 3.4rem auto 0;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(47, 123, 255, .05);
  background: var(--bg-alt);
}

/* Halo degradado detrás del carrusel para integrarlo con el hero */
.hero-carrusel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(47, 123, 255, .5), rgba(34, 211, 238, .12) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.carrusel-visor {
  overflow: hidden;
  border-radius: 20px;
}

.carrusel-pista {
  display: flex;
  transition: transform .7s cubic-bezier(.45, .05, .2, 1);
  will-change: transform;
}

.carrusel-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  aspect-ratio: 24 / 9;
  overflow: hidden;
}

.carrusel-arte {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

/* Ken Burns: la diapositiva activa hace un zoom lento y continuo */
.carrusel-slide.is-activa .carrusel-arte {
  animation: carruselZoom 6s ease-out forwards;
}
@keyframes carruselZoom {
  from { transform: scale(1.02); }
  to   { transform: scale(1.11); }
}

/* Velo para dar contraste al texto sobre la imagen */
.carrusel-texto {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  gap: .55rem;
  padding: clamp(1.3rem, 3.4vw, 2.8rem);
  padding-right: clamp(1.3rem, 12vw, 5rem);
  background: linear-gradient(90deg, rgba(8, 12, 26, .9) 0%, rgba(8, 12, 26, .6) 42%, rgba(8, 12, 26, 0) 78%),
              linear-gradient(0deg, rgba(8, 12, 26, .55) 0%, rgba(8, 12, 26, 0) 42%);
}

/* Entrada animada del texto en la diapositiva activa */
.carrusel-slide .carrusel-etq,
.carrusel-slide .carrusel-texto h3,
.carrusel-slide .carrusel-texto p {
  opacity: 0;
  transform: translateY(14px);
}
.carrusel-slide.is-activa .carrusel-etq { animation: carruselSube .6s .05s ease-out forwards; }
.carrusel-slide.is-activa .carrusel-texto h3 { animation: carruselSube .6s .16s ease-out forwards; }
.carrusel-slide.is-activa .carrusel-texto p  { animation: carruselSube .6s .27s ease-out forwards; }
@keyframes carruselSube {
  to { opacity: 1; transform: translateY(0); }
}

.carrusel-etq {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .38);
  border-radius: 999px;
  padding: .28rem .8rem;
  backdrop-filter: blur(4px);
}
.carrusel-etq::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}

.carrusel-texto h3 {
  position: relative;
  font-size: clamp(1.3rem, 3.2vw, 2.15rem);
  line-height: 1.15;
  margin: 0;
  color: #fff;
  padding-left: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
}
/* Barra de acento a la izquierda del título */
.carrusel-texto h3::before {
  content: "";
  position: absolute;
  left: 0; top: .16em; bottom: .16em;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient);
}

.carrusel-texto p {
  color: #c7d2e8;
  font-size: clamp(.92rem, 1.6vw, 1.08rem);
  line-height: 1.5;
  max-width: 520px;
  margin: 0;
}

/* Flechas estilo cristal */
.carrusel-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  line-height: 1;
  color: #fff;
  background: rgba(10, 15, 30, .45);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .25s, border-color .25s, transform .2s;
  z-index: 3;
}
.carrusel-flecha:hover,
.carrusel-flecha:focus-visible {
  background: rgba(47, 123, 255, .55);
  border-color: var(--accent-2);
  transform: translateY(-50%) scale(1.08);
  outline: none;
}
.carrusel-prev { left: 14px; }
.carrusel-next { right: 14px; }

/* Contador 01 / 05 (arriba a la derecha) */
.carrusel-contador {
  position: absolute;
  top: 14px; right: 16px;
  z-index: 3;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #dbe4f5;
  background: rgba(10, 15, 30, .5);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: .22rem .7rem;
  backdrop-filter: blur(6px);
}
.carrusel-contador b { color: var(--accent-2); }

/* Puntos de navegación */
.carrusel-puntos {
  position: absolute;
  left: 0; right: 0;
  bottom: 16px;
  display: flex;
  gap: .5rem;
  justify-content: center;
  z-index: 3;
}
.carrusel-punto {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(230, 236, 247, .35);
  cursor: pointer;
  transition: background .25s, width .25s;
}
.carrusel-punto:hover { background: rgba(230, 236, 247, .6); }
.carrusel-punto.activo {
  width: 28px;
  border-radius: 999px;
  background: var(--gradient);
}

/* Barra de progreso del autoavance (5 s) */
.carrusel-progreso {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .08);
  z-index: 3;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  overflow: hidden;
}
.carrusel-progreso > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gradient);
  box-shadow: 0 0 10px rgba(34, 211, 238, .6);
}

@media (max-width: 640px) {
  .carrusel-slide { aspect-ratio: 16 / 12; }
  .carrusel-texto {
    background: linear-gradient(0deg, rgba(8, 12, 26, .94) 12%, rgba(8, 12, 26, .5) 56%, rgba(8, 12, 26, .12) 100%);
    align-items: center;
    text-align: center;
    padding-right: clamp(1.3rem, 3.4vw, 2.8rem);
  }
  .carrusel-texto h3 { padding-left: 0; }
  .carrusel-texto h3::before { display: none; }
  .carrusel-texto p { max-width: 100%; }
  .carrusel-flecha { width: 40px; height: 40px; font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .carrusel-pista { transition: none; }
  .carrusel-slide.is-activa .carrusel-arte { animation: none; }
  .carrusel-slide .carrusel-etq,
  .carrusel-slide .carrusel-texto h3,
  .carrusel-slide .carrusel-texto p { opacity: 1; transform: none; animation: none; }
  .carrusel-progreso { display: none; }
}

.boton {
  display: inline-block;
  padding: .85rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}

.boton-primario {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(47, 123, 255, .35);
}

.boton-primario:hover { transform: translateY(-2px); opacity: .92; }

.boton-secundario {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.boton-secundario:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ---------- Servicios ---------- */
.rejilla-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tarjeta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  transition: transform .3s, border-color .3s, background .3s;
}

.tarjeta:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.tarjeta .icono {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(47, 123, 255, .12);
  color: var(--accent-2);
  margin-bottom: 1.1rem;
}

.tarjeta h3 { font-size: 1.15rem; margin-bottom: .5rem; }

.tarjeta p { color: var(--text-muted); font-size: .93rem; margin-bottom: 1rem; }

.tarjeta .precio {
  font-weight: 700;
  color: var(--accent-2);
  font-size: .95rem;
}

.tarjeta-cta {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-2);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: gap .2s, color .2s;
}

.tarjeta-cta:hover { color: var(--text); }

.enlace-pdf {
  color: var(--accent-2);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
}
.enlace-pdf:hover { text-decoration: underline; }

.enlace-recuperar {
  color: var(--accent-2);
  font-size: .88rem;
  text-decoration: none;
}
.enlace-recuperar:hover { text-decoration: underline; }

.aviso-api {
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: 1.2rem;
}

/* ---------- ¿Por qué elegirnos? ---------- */
.rejilla-metricas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.metrica {
  padding: 1.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.metrica .cifra {
  font-size: 2.2rem;
  font-weight: 800;
  display: block;
}

.metrica .etiqueta { color: var(--text-muted); font-size: .92rem; }

.lista-beneficios {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  list-style: none;
}

.lista-beneficios li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  color: var(--text-muted);
}

.lista-beneficios svg { flex-shrink: 0; color: var(--success); margin-top: .2rem; }

.lista-beneficios strong { color: var(--text); display: block; }

/* ---------- Nosotros ---------- */
.nosotros-interior {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.nosotros-texto h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.nosotros-texto p { color: var(--text-muted); margin-bottom: 1rem; }

.nosotros-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.nosotros-panel ul { list-style: none; display: grid; gap: 1rem; }

.nosotros-panel li { display: flex; align-items: center; gap: .8rem; color: var(--text-muted); }

.nosotros-panel svg { color: var(--accent-2); flex-shrink: 0; }

/* ---------- Contacto ---------- */
.formulario {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  display: grid;
  gap: 1.1rem;
}

.campo { display: grid; gap: .35rem; }

.campo label { font-size: .9rem; font-weight: 600; }

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem .9rem;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .25s;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Foco accesible con teclado: contorno visible y de buen contraste */
.campo input:focus-visible,
.campo select:focus-visible,
.campo textarea:focus-visible,
.boton:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.campo textarea { resize: vertical; min-height: 120px; }

.fila-doble {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.mensaje-estado {
  display: none;
  padding: .8rem 1rem;
  border-radius: 10px;
  font-size: .92rem;
}

.mensaje-estado.exito {
  display: block;
  background: rgba(52, 211, 153, .12);
  border: 1px solid var(--success);
  color: var(--success);
}

.mensaje-estado.error {
  display: block;
  background: rgba(255, 93, 115, .12);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-interior {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 { margin-bottom: .8rem; font-size: 1rem; }

.footer p, .footer a, .footer li {
  color: var(--text-muted);
  font-size: .9rem;
  text-decoration: none;
}

.footer ul { list-style: none; display: grid; gap: .45rem; }

.footer a:hover { color: var(--accent-2); }

.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

.enlace-admin { opacity: .55; font-size: .8rem; }

/* ---------- Animaciones de aparición (con IntersectionObserver) ---------- */
.aparece {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.aparece.visible {
  opacity: 1;
  transform: none;
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aparece { opacity: 1; transform: none; transition: none; }
}

/* ---------- Panel de administración ---------- */
.admin-cuerpo { padding: 7rem 0 4rem; min-height: 70vh; }

.tabla-envoltura { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

.tabla-contactos {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: .92rem;
  min-width: 720px;
}

.tabla-contactos th,
.tabla-contactos td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.tabla-contactos th {
  background: var(--bg-alt);
  color: var(--accent-2);
  font-weight: 600;
  white-space: nowrap;
}

.tabla-contactos tr:last-child td { border-bottom: 0; }

.tabla-contactos tbody tr:hover { background: var(--surface-hover); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nosotros-interior { grid-template-columns: 1fr; }
}

/* Navbar: colapsa al menú hamburguesa mientras los enlaces no quepan en una línea */
@media (max-width: 1240px) {
  .boton-menu { display: block; }

  .nav-enlaces {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }

  .nav-enlaces.abierto { max-height: 640px; }

  .nav-enlaces li { border-top: 1px solid var(--border); }

  .nav-enlaces a {
    display: block;
    padding: .9rem 1.4rem;
    white-space: normal;
  }

  .nav-idioma { padding: .5rem 1.4rem; }

  .nav-cta {
    border-radius: 0;
    background: transparent;
    color: var(--accent-2) !important;
    font-weight: 700;
  }
}

@media (max-width: 720px) {
  .fila-doble { grid-template-columns: 1fr; }

  .seccion { padding: 3.8rem 0; }

  .hero { padding: 9rem 0 5rem; }
}

/* ---------- Pagos en línea (PSE) ---------- */
.contenedor-estrecho { max-width: 620px; }

.tarjeta-pago {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.pago-encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-pse {
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
  background: var(--gradient);
  padding: .35rem .8rem;
  border-radius: 8px;
  font-size: 1rem;
}

.pago-seguro {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--success);
  font-size: .85rem;
  font-weight: 600;
}

.ayuda { color: var(--text-muted); font-size: .8rem; }

.montos-rapidos {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.montos-rapidos button {
  flex: 1 1 auto;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 10px;
  padding: .6rem .7rem;
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.montos-rapidos button:hover {
  border-color: var(--accent-2);
  color: var(--text);
}

.boton-bloque { width: 100%; }

.pago-nota {
  color: var(--text-muted);
  font-size: .82rem;
  text-align: center;
  line-height: 1.5;
}

/* Resultado del pago */
.tarjeta-resultado { text-align: center; justify-items: center; }
.tarjeta-resultado h2 { font-size: 1.6rem; }
.tarjeta-resultado p { color: var(--text-muted); }
.icono-resultado { color: var(--success); }
.ref-pago { font-size: .85rem; color: var(--text) !important; word-break: break-all; }
.tarjeta-resultado .boton { margin-top: .6rem; }
