/* ===== RYBIX - Sin parpadeos, sin efectos de scroll, fiel a maqueta ===== */
:root {
  --bg-dark: #060a12;
  --glass: rgba(10, 22, 42, 0.5);
  --glass-border: rgba(0, 212, 255, 0.4);
  --glass-glow: rgba(0, 212, 255, 0.15);
  --accent: #00d4ff;
  --accent-bright: #33ddff;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.9);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: auto;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Fondo: imagen a pantalla completa. Para que se vea como la maqueta, usa una imagen de al menos 1920×1080 px (Full HD); ideal 2560×1440 px. Formato 16:9. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  background-image: url('/static/img/fondo.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  z-index: -2;
}

/* Overlay suave para legibilidad; en home se usa uno más ligero para que se vean las líneas/partículas */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.5) 0%, rgba(6, 10, 18, 0.2) 40%, rgba(6, 10, 18, 0.25) 70%, rgba(6, 10, 18, 0.55) 100%);
  z-index: -1;
  pointer-events: none;
}

/* En el home el overlay es más ligero para que el fondo tecnológico se aprecie mejor */
body.page-home::after {
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.4) 0%, rgba(6, 10, 18, 0.15) 35%, rgba(6, 10, 18, 0.2) 65%, rgba(6, 10, 18, 0.5) 100%);
}

/* ----- Header: cristal esmerilado, sin animación ----- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  /*background: rgba(8, 20, 38, 0.55);*/
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /*border-bottom: 1px solid var(--glass-border);*/
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo-img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

.nav a.nav-active {
  color: var(--text);
  font-weight: 600;
}

.btn-cta-header {
  background: var(--accent) !important;
  color: var(--bg-dark) !important;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-cta-header:hover {
  background: var(--accent-bright) !important;
  color: var(--bg-dark) !important;
}

/* Botón hamburguesa: solo visible en móvil */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  z-index: 102;
  position: relative;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ----- Hero: título en 2 filas, limpio ----- */
/* En el home el hero tiene buen espacio arriba; debajo vienen tarjetas y seguridad */
body.page-home main {
  min-height: auto;
  display: block;
}

body.page-home .hero {
  padding: 4rem 1.5rem 4rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 5rem 2rem 5.5rem;
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.12em;
}

body.page-home .hero-title {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  margin-bottom: 1.25rem;
}

body.page-home .hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2.25rem;
}

body.page-home .hero-buttons {
  gap: 1.25rem;
}

.hero-title-line {
  display: block;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 500;
}

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

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: var(--bg-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

/* ----- Tarjetas: cristal, borde brillante, sin parpadeo ----- */
.cards-section {
  padding: 2rem 2rem 3.5rem;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.cards-section.page-section {
  padding-top: 4rem;
}

.cards-section--home {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.75rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 0 28px var(--glass-glow);
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 0 32px rgba(0, 212, 255, 0.2);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 1.25rem;
  margin: 10px auto;
}

.card-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  text-align: center;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.card-link:hover {
  color: var(--accent-bright);
}

.card-link--block {
  margin-top: 1.25rem;
}

/* ----- Seguridad: mismo cristal, sin animación ----- */
.security-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 3rem 2rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 0 40px var(--glass-glow);
  position: relative;
  z-index: 1;
}

.security-section.security-page {
  margin-top: 3rem;
  margin-bottom: 4rem;
}

.security-section--home {
  margin-top: 0;
  margin-bottom: 4rem;
}

.security-section .security-title {
  margin-top: 0;
}

.security-content {
  flex: 1;
}

.security-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.security-list {
  list-style: none;
}

.security-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.security-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

.security-icon {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  color: var(--accent);
}

.security-icon svg {
  width: 100%;
  height: 100%;
}

.security-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ----- Invertir ----- */
.invest-section {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 700px;
  margin: 0 auto 4rem;
  position: relative;
  z-index: 1;
}

.invest-section.invest-page {
  padding-top: 5rem;
}

.invest-section .section-heading {
  margin-bottom: 0.75rem;
}

.invest-section .section-intro {
  margin-bottom: 1.5rem;
}

/* ----- Contacto ----- */
.contact-section {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto 4rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-section.contact-page {
  padding-top: 5rem;
}

.contact-section .section-intro {
  margin-bottom: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.contact-block {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.contact-block--full {
  grid-column: 1 / -1;
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.contact-value {
  color: var(--text);
  font-size: 1rem;
  text-decoration: none;
}

a.contact-value:hover {
  color: var(--accent);
}

.contact-address {
  font-style: normal;
  line-height: 1.5;
}

/* ----- Footer ----- */
.footer {
  padding: 2rem 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(8, 20, 38, 0.45);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  font-weight: 600;
  color: var(--text);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.footer-contact a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-contact span {
  color: var(--text-muted);
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* ===== Páginas de servicios: estilo Jarvis / IA ===== */
.service-index-hero {
  text-align: center;
  padding: 4rem 2rem 2rem;
  position: relative;
  z-index: 1;
}

.service-index-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-index-tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.cards-section--index {
  padding-top: 0;
  padding-bottom: 4rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.cards-section--index .card-inner {
  text-align: center;
}

.cards-section--index .card-icon {
  margin-left: auto;
  margin-right: auto;
}

.card--link .card-inner {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card--link .card-inner .card-link {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.card--link:hover {
  border-color: var(--accent);
}

/* Hero de detalle de servicio (tipo Jarvis) */
.service-hero {
  padding: 4rem 2rem 3rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.service-hero__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.service-hero__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.service-hero__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.service-hero__tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Paneles de contenido (cristal + etiqueta tipo módulo) */
.service-intro {
  max-width: 900px;
  margin: 0 auto 2rem;
}

.service-panel {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 2rem 2rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  position: relative;
  z-index: 1;
}

.service-panel__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.service-panel__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-panel__content {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0;
}

.service-intro__text {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.service-cta-wrap {
  text-align: center;
  padding: 3rem 2rem 4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.service-cta-wrap .btn {
  min-width: 180px;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-section {
    flex-direction: column;
    text-align: center;
  }

  .security-list li {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    padding: 1rem 1.25rem;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-overlay {
    display: block;
  }

  body.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 5rem 1.5rem 2rem;
    background: rgba(8, 20, 38, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    z-index: 101;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  body.nav-open .nav {
    transform: translateX(0);
  }

  .nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 1rem;
  }

  .nav a.btn-cta-header {
    margin-top: 0.5rem;
    text-align: center;
    border-bottom: none;
  }

  body.nav-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.nav-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 3rem 1.5rem 4rem;
  }

  .hero-title {
    gap: 0.1em;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    padding: 0 0.5rem;
  }

  .security-section {
    padding: 2rem 1rem;
  }

  .security-icon {
    width: 80px;
    height: 80px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-contact {
    flex-direction: column;
  }

  .service-hero {
    padding: 3rem 1rem 2rem;
  }

  .service-panel {
    padding: 1.5rem 1rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .service-cta-wrap {
    flex-direction: column;
    padding: 2rem 1rem 3rem;
  }

  .service-cta-wrap .btn {
    width: 100%;
    min-width: 0;
  }
}

/* ===== Botón flotante WhatsApp ===== */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s ease;
}
.wa-float:hover {
  transform: translateY(-2px);
}
.wa-float:focus-visible {
  outline: 2px solid #25d366;
  outline-offset: 3px;
  border-radius: 50%;
}

.wa-float__btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  transition: box-shadow 0.2s ease;
}
.wa-float__btn svg {
  color: #fff;
}
.wa-float:hover .wa-float__btn {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Badge de notificación (call to action) */
.wa-float__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ff3b30;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.5);
  line-height: 1;
}

@media (max-width: 480px) {
  .wa-float {
    bottom: 1.25rem;
    right: 1.25rem;
  }
  .wa-float__btn {
    width: 48px;
    height: 48px;
  }
  .wa-float__btn svg {
    width: 24px;
    height: 24px;
  }
  .wa-float__badge {
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    top: -1px;
    right: -1px;
  }
}
