:root {
  --blue: #105da1;
  --blue-secondary: #476ea8;
  --blue-dark: #0b4377;
  --blue-soft: #eef5fc;
  --text: #101828;
  --muted: #667085;
  --light: #f7f9fc;
  --border: #e5eaf2;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 234, 242, 0.8);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo img {
  height: 80px; 
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--muted);
}

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

.hero {
  min-height: calc(100vh - 76px);  /* Asegura que el hero tenga la altura total de la pantalla */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 80px;
  align-items: center;
}

.eyebrow,
.section-label {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.075em;
  max-width: 760px;
}

.hero p {
  margin: 28px 0 0;
  font-size: 20px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 18px 40px rgba(16, 93, 161, 0.24);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--blue-soft);
  color: var(--blue);
}

.btn-secondary:hover {
  background: #e4eef9;
}

.hero-visual {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-image {
  position: absolute;
  left: -50%;  /* Alinea la imagen a la izquierda */
  width: 80vw;  /* 50% del ancho de la ventana */
  max-width: 900px;  /* Limita el tamaño máximo */
  height: auto;  /* Mantiene la proporción */
  object-fit: contain;  /* Asegura que la imagen no se distorsione */
  z-index: -1;  /* Mantiene la imagen detrás del texto */
}

@media (min-width: 768px) and (max-width: 1500px) {
  .device-image {
    position: relative;
    top: 0px;  /* Asegura que la imagen no se superponga al texto */
    width: 75vw;  /* Ajusta el tamaño de la imagen en pantallas de 1000px a 768px */
    max-width: 650px;  /* Limita el tamaño máximo en estas pantallas */
    left: -15%;  /* Mueve la imagen ligeramente a la izquierda */
  }
}

@media (max-width: 768px) {
  .device-image {
    position: relative;
    top: 0px;  /* Mueve la imagen hacia abajo para que no se sobreponga al texto */
    width: 95vw;  /* Aumenta el tamaño de la imagen en pantallas pequeñas */
    max-width: 900px;  /* Limita el tamaño máximo en pantallas pequeñas */
    left: -5%;
  }

  #about {
    padding: 30px 0;  /* Reduce el espacio superior e inferior en móviles */
    padding-bottom: 170px;  /* Aumenta solo el espacio inferior */
  }
}

/* Sección 'Quiénes somos' */
#about {
  position: relative;
}

/* Imagen pegada al borde inferior */
.image-bottom {
  position: absolute;
  bottom: 0;  /* Alinea la imagen al borde inferior */
  left: 35%;
  right: 0;
  text-align: center;
  z-index: -1;  /* Asegura que la imagen quede detrás del texto */
}

.image-bottom-img {
  width: 100%;  /* Se ajusta al 100% del contenedor */
  max-width: 450px;  /* Limita el tamaño máximo de la imagen */
  margin: 0 auto;
}

/* En pantallas grandes, mover la imagen a la derecha */
@media (min-width: 1800px) {
  .image-bottom-img {
    left: -5%;  /* Mueve la imagen ligeramente a la derecha */
    position: relative;
  }
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
  .image-bottom-img {
    position: relative;
    top: 10px;  /* Ajusta la imagen ligeramente hacia abajo */
    width: 65vw;  /* Reduce el tamaño en pantallas pequeñas */
    max-width: 800px;  /* Limita el tamaño máximo */
    left: -30%;
    margin: 0 auto;  /* Centra la imagen en la pantalla */
  }
}

.screen-line {
  height: 14px;
  width: 70%;
  background: rgba(71, 110, 168, 0.18);
  border-radius: 999px;
  margin-bottom: 16px;
}

.screen-line.large {
  height: 28px;
  width: 86%;
  background: linear-gradient(90deg, var(--blue), var(--blue-secondary));
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 42px;
}

.screen-grid span {
  height: 110px;
  border-radius: 18px;
  background: var(--light);
  border: 1px solid var(--border);
}

.section {
  padding: 120px 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
}

.section h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.section p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
}

.services-section {
  background: var(--light);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 56px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 30px;
  min-height: 320px;
  transition: 0.2s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(16, 24, 40, 0.08);
  border-color: rgba(16, 93, 161, 0.25);
}

.service-card span {
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
}

.service-card h3 {
  margin: 48px 0 18px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.service-card p {
  font-size: 15px;
  line-height: 1.7;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);  /* 6 columnas por defecto */
  gap: 20px;
  margin-top: 40px;
}

/* Ajuste en pantallas pequeñas (móviles) */
@media (max-width: 768px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr) !important;  /* Forzamos el cambio a 2 columnas */
    gap: 16px !important;  /* Forzamos el espacio entre los logos */
  }
}

.client-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 200px;  /* Limita el tamaño máximo de los logos */
  margin: 0 auto;
}

.client-logo img {
  max-width: 100%;
  height: auto;
}

.contact-section {
  padding-top: 40px;
}

.contact-box {
  background: linear-gradient(135deg, #101828, #0b4377);
  color: white;
  border-radius: 40px;
  padding: 76px;
  text-align: center;
}

.contact-box .section-label {
  color: #b7d4f3;
}

.contact-box h2 {
  color: white;
}

.contact-box p {
  max-width: 680px;
  margin: 24px auto 36px;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 960px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding: 72px 0;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero p {
    font-size: 18px;
  }

  .services-grid,
  .clients-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    padding: 48px 24px;
    border-radius: 28px;
  }

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

/* Menú para móviles */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 100%;
  height: 4px;
  background: var(--blue);
  border-radius: 4px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  text-transform: none;
}

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

/* Menú en móvil */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    padding: 16px;
    z-index: 10;
    transform: translateY(-20px);
    transition: transform 0.3s ease-out;
  }
  
  .nav-links a {
    font-size: 18px;
    text-transform: none;
    padding-right: 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.active {
    display: flex;
    transform: translateY(0);
  }
}