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

:root {
  --azul: #2A2F87;
  --azul-oscuro: #111431;
  --amarillo: #FFBB00;
  --acento: #00BFA6;
  --fondo: #FFFFFC;
  --fondo-claro: #E8EAF6;
  --fuente-base: 'Metropolis', sans-serif;
  --fuente-display: 'Space Grotesk', 'Metropolis', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--fuente-base);
  background-color: var(--fondo);
  color: var(--azul);
  line-height: 1.5;
  transition: opacity 0.25s ease;
}

body.lang-updating {
  opacity: 0.72;
}

h1, h2, h3, h4 {
  font-family: var(--fuente-display);
  letter-spacing: -0.01em;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  min-height: clamp(600px, 100vh, 920px);
  overflow: hidden;
}

.hero-image {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.hero-overlay {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  min-height: 100%;
  width: 100%;
  background: radial-gradient(90% 85% at 20% 30%, rgba(0, 191, 166, 0.22), transparent 55%),
              linear-gradient(135deg, rgba(17, 20, 49, 0.92) 0%, rgba(42, 47, 135, 0.82) 55%, rgba(0, 191, 166, 0.55) 100%);
  padding: clamp(1.75rem, 6vw, 3.5rem);
  gap: clamp(1rem, 3vw, 1.75rem);
  animation: fade-slide 520ms ease;
}

.lang-switch {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  gap: 0.25rem;
  --lang-offset: 2px;
  min-width: 110px;
  min-height: 36px;
  position: absolute;
  overflow: hidden;
}

.lang-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: var(--lang-offset);
  width: calc(50% - 4px);
  height: calc(100% - 4px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: left 0.24s ease;
  pointer-events: none;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
}

.lang-btn.is-active {
  color: #ffbb00;
}

@keyframes fade-slide {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}


.hero-overlay h1 {
  font-family: 'Orbitron', 'Metropolis', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.hero-overlay p {
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  margin: 0;
  max-width: 780px;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.hero-logo {
  display: block;
  width: 100%;
  max-width: min(55vw, 420px);
  margin: 0 auto 0.75rem;
}

.hero-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.btn {
  background: var(--amarillo);
  color: var(--azul);
  border: none;
  padding: 0.75rem 1.5rem;
  margin-top: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 30px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 30px rgba(255, 187, 0, 0.35);
}

.btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.hero-overlay .btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.hero-overlay .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 191, 166, 0.35);
  transform: translateY(-1px);
}

.hero-ctas {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pilares {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 2rem;
  background: #F7F8FF;
  text-align: center;
}

.card {
  background: white;
  border: 2px solid #E0E0E0;
  padding: 2rem;
  width: 250px;
  border-radius: 12px;
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--azul);
  color: var(--azul);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: rgba(42, 47, 135, 0.06);
  box-shadow: 0 8px 20px rgba(0, 191, 166, 0.2);
  transform: translateY(-1px);
}

section {
  padding: 4rem 2rem;
  text-align: center;
}

.sobre {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.sobre-subtitle {
  margin: 0.5rem auto 0;
  max-width: 780px;
  color: #4b4f95;
  font-weight: 600;
  font-family: var(--fuente-display);
}

.sobre-contenido {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(1.25rem, 3vw, 2.5rem);
}

.sobre-imagen {
  position: relative;
  width: 100%;
  max-width: clamp(360px, 70vw, 720px);
  margin: 0 auto;
}

.sobre-imagen::before {
  content: '';
  position: absolute;
  inset: -8%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 187, 0, 0.18), transparent 55%),
              radial-gradient(circle at 70% 70%, rgba(42, 47, 135, 0.16), transparent 52%);
  filter: blur(18px);
  z-index: 0;
}

.sobre-imagen-marco {
  position: relative;
  z-index: 1;
  border-radius: 18px;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 20px 55px rgba(42, 47, 135, 0.25), 0 8px 16px rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, #ffffff 0%, #f3f5ff 100%);
  display: inline-block;
}

.sobre-imagen-marco img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.sobre-texto {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  text-align: justify;
}

.sobre-badges {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  display: grid;
  gap: 0.4rem;
  color: var(--azul-oscuro);
  font-weight: 700;
}

.sobre-badges li {
  background: #f1f3ff;
  border: 1px solid rgba(42, 47, 135, 0.12);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  display: inline-block;
}

@keyframes float-soft {
  0% { transform: translateY(0px) rotate(-0.6deg); }
  50% { transform: translateY(-10px) rotate(0.6deg); }
  100% { transform: translateY(0px) rotate(-0.6deg); }
}

.sobre-texto p {
  margin: 0;
}

.grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

.producto {
  background: #E8EAF6;
  padding: 2rem;
  border-radius: 10px;
  flex: 1 1 260px;
  width: 100%;
  max-width: 320px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1rem, 2vw, 1.5rem);
  height: 100%;
}

.productos-grid .producto {
  max-width: none;
  width: 100%;
  flex: none;
}

.producto h3 {
  margin-top: 0;
}

.producto p {
  margin: 0;
}

.producto-simuladores {
  background: #FFFFFF;
  border: 2px solid #D6DAF9;
  max-width: none;
  flex: none;
}

.productos-grid .producto-simuladores {
  grid-column: span 2;
}

.producto .carousel {
  width: min(100%, 33vw);
  max-width: 540px;
  margin: 0 auto;
  align-self: center;
}

@media (max-width: 1024px) {
  .productos-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .productos-grid .producto-simuladores {
    grid-column: span 1;
  }

  .producto .carousel {
    width: 100%;
    max-width: none;
  }
}

.producto-simuladores p {
  color: #2A2F87;
}

.productos-grid {
  width: 100%;
  max-width: 1200px;
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem);
  margin-left: auto;
  margin-right: auto;
}

.carousel {
  position: relative;
  margin-top: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  background: #E8EAF6;
  box-shadow: 0 12px 30px rgba(42, 47, 135, 0.25);
  touch-action: pan-y;
  aspect-ratio: 4 / 3;
  min-height: 240px;
  display: flex;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
}

.carousel-loading,
.carousel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #2A2F87;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 100%;
  height: 100%;
  padding: 1rem;
}

.carousel-slide {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: #f9faff;
  transition: opacity 180ms ease;
}

.carousel-slide.is-active {
  display: flex;
  opacity: 1;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

/* Ajuste específico para soluciones digitales: prioriza alto completo sin recorte */
.carousel[data-carousel="soluciones-digitales"] .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(17, 20, 49, 0.55);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-control:hover {
  background: rgba(17, 20, 49, 0.8);
  transform: translateY(-50%) scale(1.05);
}

.carousel-control:focus-visible {
  outline: 3px solid #FFBB00;
  outline-offset: 2px;
}

.carousel-control.prev {
  left: 0.75rem;
}

.carousel-control.next {
  right: 0.75rem;
}

.carousel-dots {
  position: absolute;
  inset-inline: 0;
  bottom: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  z-index: 2;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(17, 20, 49, 0.35);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.carousel-dot.is-active {
  background: var(--acento);
  border-color: var(--acento);
  transform: scale(1.15);
}

.carousel-counter {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  background: rgba(17, 20, 49, 0.65);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 20, 49, 0.74);
  padding: clamp(1rem, 4vw, 2rem);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.lightbox-dialog {
  position: relative;
  margin: 0;
  max-width: min(90vw, 960px);
  width: 100%;
  max-height: min(82vh, 760px);
  background: #0f1230;
  border-radius: 14px;
  padding: clamp(0.65rem, 2vw, 0.9rem);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  transition: transform 200ms ease;
  transform: scale(0.97);
}

.lightbox.is-open .lightbox-dialog {
  transform: scale(1);
}

.lightbox-image {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
  background: #0a0c22;
}

.lightbox-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background 0.18s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.lightbox-close:focus-visible {
  outline: 3px solid #FFBB00;
  outline-offset: 2px;
}

.co-creacion .destacado {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
}

.video-placeholder {
  background: #6266B4;
  color: white;
  font-size: 3rem;
  width: 200px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}

.footer {
  background: linear-gradient(135deg, #0d102a 0%, #1a1f57 60%, #0d102a 100%);
  color: #e9ebff;
  padding: 3.5rem 1.5rem 3rem;
  text-align: left;
}

.contacto-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 1.75rem);
  align-items: start;
}

.contacto-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(4px);
}

.contacto-card h3,
.contacto-card h4 {
  margin: 0 0 0.35rem;
}

.contacto-card-sub {
  margin: 0 0 0.75rem;
  color: #c8ccee;
  font-weight: 500;
}

.contacto-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  margin: 0 0 0.35rem;
  color: #8ce0d0;
}

.contacto-lead {
  margin: 0 0 1rem;
  color: #d9dcf5;
  font-weight: 600;
}

.contacto-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.45rem;
}

.contacto-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
  color: #eef1ff;
}

.contacto-list a {
  color: #eef1ff;
  text-decoration: none;
}

.contacto-list a:hover {
  text-decoration: underline;
}

.contacto-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffbb00;
}

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

.contacto-icon--link {
  color: #00bfa6;
}

.contacto-icon--pin {
  color: #7ac5ff;
}

.contacto-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.contacto-badges span,
.contacto-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f2f4ff;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.contacto-card--cta {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(0, 191, 166, 0.14));
  border-color: rgba(0, 191, 166, 0.35);
}

.contacto-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.75rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #e9ebff;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 191, 166, 0.3);
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.contacto-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.contacto-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.contacto-field {
  display: grid;
  gap: 0.35rem;
  color: #dfe2ff;
}

.contacto-field input,
.contacto-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--fuente-base);
}

.contacto-field input:focus,
.contacto-field textarea:focus {
  outline: 2px solid var(--acento);
  border-color: var(--acento);
}

.form-status {
  min-height: 1.2rem;
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  color: #c8ccee;
}

.form-status.is-error {
  color: #ff8a8a;
}

.form-status.is-success {
  color: #8ce0d0;
}

.contacto-powered {
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

@media (max-width: 900px) {
  section {
    padding: 3.5rem 1.5rem;
  }

  .pilares,
  .grid {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 110vh;
  }

  .hero-overlay {
    gap: 0.9rem;
    padding: 2.25rem 1.5rem;
  }

  .hero-logo {
    max-width: min(70vw, 300px);
    margin: 0 auto 0.5rem;
  }

  .carousel {
    min-height: 200px;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
  }

  section {
    padding: 3rem 1.25rem;
  }

  .pilares {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 100%;
    max-width: 320px;
  }

  .grid {
    flex-direction: column;
    align-items: center;
  }

  .producto {
    width: 100%;
    max-width: 320px;
  }

  .productos-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .productos-grid .producto {
    max-width: none;
  }

  .producto .carousel {
    width: 100%;
  }

  .co-creacion .destacado {
    flex-direction: column;
  }

  .video-placeholder {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 110vh;
  }

  .hero-overlay {
    padding: 1.75rem 1.25rem;
    gap: 0.75rem;
  }

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

  .hero-logo {
    max-width: min(80vw, 220px);
    margin: 0 auto 0.5rem;
  }

  .carousel {
    min-height: 180px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-secondary {
    width: 100%;
  }

  section {
    padding: 2.5rem 1rem;
  }

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

  .contacto-actions {
    flex-direction: column;
  }

  .btn-ghost,
  .btn {
    width: 100%;
    justify-content: center;
  }
}
