/*
 * Estilos base para el sitio estático de Zerogap.
 *
 * La paleta se inspiró en los tonos utilizados en la página original de Squarespace:
 * azules profundos para las zonas destacadas y blancos para las tarjetas de contenido.
 * Se utilizan fuentes de Google (Rubik y Nunito Sans) para mantener una presencia moderna y
 * profesional. El diseño es responsivo; las tarjetas se adaptan a distintos tamaños de
 * pantalla mediante flexbox y media queries.
 */

/* Variables de color para facilitar cambios de paleta */
:root {
  --primary-color: #0b5ed7;
  --primary-color-dark: #094ab2;
  --dark-bg-start: #032a46;
  --dark-bg-end: #0b5ed7;
  --text-color: #333333;
  --light-bg: #f7f9fc;
}

body {
  margin: 0;
  font-family: 'Nunito Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
}

/* Barra de navegación */
header {
  background-color: #ffffff;
  padding: 15px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo img {
  height: 42px;
}

/* Menú hamburguesa - oculto por defecto */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  z-index: 101;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Animaciones del menú hamburguesa */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-family: 'Rubik', sans-serif;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
  position: relative;
}

nav a:hover {
  color: var(--primary-color);
  background-color: rgba(11, 94, 215, 0.05);
}

/* Navegación activa */
nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  box-shadow: 0 2px 8px rgba(11, 94, 215, 0.3);
}

nav a.active:hover {
  background: linear-gradient(135deg, var(--primary-color-dark), var(--primary-color));
  color: #ffffff;
}

/* Responsividad móvil */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 80px 30px 30px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100;
  }
  
  nav.active {
    right: 0;
  }
  
  nav a {
    margin: 0 0 20px 0;
    padding: 15px 20px;
    width: 100%;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(11, 94, 215, 0.1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }
  
  nav a:hover {
    transform: translateX(5px);
    background: rgba(11, 94, 215, 0.1);
    border-color: var(--primary-color);
  }
  
  nav a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(11, 94, 215, 0.3);
  }
  
  /* Overlay para cerrar el menú */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Ajuste del logo en móvil */
  .logo {
    z-index: 101;
  }
}

/* Animación de entrada para los links del menú móvil */
@media (max-width: 768px) {
  nav.active a {
    animation: slideInFromRight 0.4s ease-out forwards;
  }
  
  nav.active a:nth-child(1) { animation-delay: 0.1s; }
  nav.active a:nth-child(2) { animation-delay: 0.15s; }
  nav.active a:nth-child(3) { animation-delay: 0.2s; }
  nav.active a:nth-child(4) { animation-delay: 0.25s; }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hero de páginas internas */
#page-hero {
  background: linear-gradient(135deg, var(--dark-bg-start), var(--dark-bg-end));
  color: #ffffff;
  text-align: center;
  padding: 60px 20px;
}

#page-hero h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5em;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
}

#page-hero .hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 0;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

/* Hero */
#hero {
  position: relative;
  background: 
    linear-gradient(135deg, rgba(11, 33, 61, 0.9), rgba(26, 82, 118, 0.85)),
    url('images/industrial-process.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #ffffff;
  text-align: center;
  padding: 90px 20px;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 20%, rgba(11, 94, 215, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(26, 82, 118, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, rgba(11, 33, 61, 0.8) 0%, rgba(26, 82, 118, 0.7) 100%);
  backdrop-filter: blur(1px);
  z-index: 1;
}

#hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(11, 94, 215, 0.04) 1px, transparent 1px);
  background-size: 150px 150px, 200px 200px, 100px 100px;
  animation: float 20s ease-in-out infinite;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateX(0) translateY(0); }
  33% { transform: translateX(-10px) translateY(-5px); }
  66% { transform: translateX(10px) translateY(5px); }
}

#hero .hero-content {
  position: relative;
  z-index: 2;
}

#hero h1 {
  font-size: 3rem;
  margin: 0 0 0.3em;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
}

#hero h2 {
  font-size: 1.5rem;
  margin: 0 0 1em;
  font-weight: 700;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#hero p {
  max-width: 800px;
  margin: 0 auto 1.5em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btn {
  display: inline-block;
  padding: 15px 35px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: #ffffff;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  font-family: 'Rubik', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(11, 94, 215, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  animation: fadeInUp 1s ease-out 1.4s both;
  margin-top: 1em;
}

.btn:hover {
  background: linear-gradient(135deg, var(--primary-color-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 94, 215, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hero mejorado */
.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2em;
  opacity: 0.95;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-description {
  max-width: 900px;
  margin: 0 auto 3em;
  text-align: left;
}

.hero-description p {
  margin-bottom: 1.5em;
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin: 3em 0;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 25px 20px;
  min-width: 140px;
  transition: all 0.3s ease;
  opacity: 0;
  animation: slideInUp 0.6s ease-out forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.8s; }
.stat-item:nth-child(2) { animation-delay: 1.0s; }
.stat-item:nth-child(3) { animation-delay: 1.2s; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  font-family: 'Rubik', sans-serif;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.3em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sección Qué hacemos */
#what-we-do {
  background-color: #ffffff;
  padding: 80px 20px;
}

#what-we-do .container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-intro {
  text-align: center;
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 4em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.pillars-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 3em;
}

.pillar-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(11, 94, 215, 0.1);
  position: relative;
  overflow: hidden;
}

.pillar-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(11, 94, 215, 0.15);
  border-color: var(--primary-color);
}

.pillar-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(11, 94, 215, 0.1);
  transition: all 0.3s ease;
}

.pillar-card:hover .pillar-icon {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.pillar-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pillar-card h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1em;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
}

.pillar-card p {
  color: #666;
  margin-bottom: 1.5em;
  line-height: 1.6;
}

.pillar-features {
  list-style: none;
  padding: 0;
  text-align: left;
}

.pillar-features li {
  position: relative;
  padding: 8px 0 8px 25px;
  color: #555;
  font-size: 0.95rem;
}

.pillar-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Sección Casos de éxito */
#success-cases {
  background-color: var(--light-bg);
  padding: 80px 20px;
}

#success-cases .container {
  max-width: 1400px;
  margin: 0 auto;
}

.cases-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 3em;
}

.case-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(11, 94, 215, 0.1);
  position: relative;
  overflow: hidden;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(11, 94, 215, 0.15);
  border-color: var(--primary-color);
}

.case-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(11, 94, 215, 0.1);
  transition: all 0.3s ease;
}

.case-card:hover .case-icon {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.case-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-card h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1em;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
}

.case-card p {
  color: #666;
  margin-bottom: 1.5em;
  line-height: 1.6;
  font-size: 0.95rem;
}

.case-results {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(11, 94, 215, 0.1);
}

.result-item {
  text-align: center;
  flex: 1;
}

.result-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Rubik', sans-serif;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.3em;
}

.result-label {
  font-size: 0.8rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

/* Sección de metodología */
#methodology {
  background-color: #ffffff;
  padding: 80px 20px;
}

.methodology-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 3em;
}

.step-item {
  text-align: center;
  position: relative;
  padding: 30px 20px;
}

.step-number {
  display: inline-block;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Rubik', sans-serif;
  line-height: 60px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.step-item h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1em;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
}

.step-item p {
  color: #666;
  line-height: 1.6;
}

/* Conectores entre pasos (solo en desktop) */
@media (min-width: 768px) {
  .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 60px;
    right: -20px;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    z-index: 1;
  }
}

/* Detalles expandidos en casos de éxito */
.case-details {
  text-align: left;
  margin: 20px 0;
  padding: 20px;
  background: rgba(11, 94, 215, 0.03);
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
}

.case-details h4 {
  font-size: 1rem;
  color: var(--primary-color);
  margin: 0 0 10px 0;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
}

.case-details p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
  color: #555;
}

/* Secciones generales */
section {
  padding: 60px 20px;
}

section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5em;
  color: var(--primary-color);
  font-family: 'Rubik', sans-serif;
}

/* Tarjetas de servicios y suite forestal */
.card-container,
.suite-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.card,
.suite-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  flex: 1 1 300px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 20px;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.suite-card .circle-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 20px;
  margin-bottom: 20px;
}

.card h3,
.suite-card h3 {
  font-size: 1.3rem;
  margin: 0.7em 0 0.5em;
  font-family: 'Rubik', sans-serif;
  color: var(--primary-color);
}

.card p,
.suite-card p {
  padding: 0 15px;
  flex: 1;
}

/* Sección de clientes - Carrusel horizontal */
#clients {
  background-color: #ffffff;
  overflow: hidden;
}

.clients-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3em;
  font-size: 1.1rem;
  color: #666666;
}

.clients-carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  padding: 0 60px;
  overflow: hidden;
}

.clients-carousel-track {
  display: flex;
  gap: 30px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  padding: 20px 0;
}

.client-item {
  flex: 0 0 180px;
  height: 120px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(11, 94, 215, 0.08);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.client-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(11, 94, 215, 0.1), transparent);
  transition: left 0.6s ease;
}

.client-item:hover::before {
  left: 100%;
}

/* Añadir un efecto de resplandor sutil */
.client-item::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 22px;
  background: linear-gradient(45deg, 
    rgba(11, 94, 215, 0.1), 
    rgba(255, 255, 255, 0.1), 
    rgba(11, 94, 215, 0.1)
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.client-item:hover::after {
  opacity: 1;
}

.client-item:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 0 20px 50px rgba(11, 94, 215, 0.2);
  border-color: var(--primary-color);
  background: linear-gradient(135deg, #ffffff 0%, rgba(11, 94, 215, 0.02) 100%);
}

.client-item img {
  width: 120px;
  height: 60px;
  object-fit: contain;
  filter: grayscale(40%) brightness(1.1) contrast(1.1);
  transition: all 0.4s ease;
  padding: 10px;
}

.client-item:hover img {
  filter: grayscale(0%) brightness(1) contrast(1.2);
  transform: scale(1.1);
}

/* Controles del carrusel horizontal */
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.carousel-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(11, 94, 215, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.carousel-btn.prev-btn {
  left: 10px;
}

.carousel-btn.next-btn {
  right: 10px;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(11, 94, 215, 0.4);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Efecto de desvanecimiento en los bordes */
.clients-carousel-container::before,
.clients-carousel-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 5;
  pointer-events: none;
}

.clients-carousel-container::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, transparent);
}

.clients-carousel-container::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, transparent);
}

/* Animación de auto-scroll suave */
@keyframes autoScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Animaciones de entrada */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.client-item {
  animation: slideInFromLeft 0.6s ease forwards;
}

.client-item:nth-child(1) { animation-delay: 0.1s; }
.client-item:nth-child(2) { animation-delay: 0.15s; }
.client-item:nth-child(3) { animation-delay: 0.2s; }
.client-item:nth-child(4) { animation-delay: 0.25s; }
.client-item:nth-child(5) { animation-delay: 0.3s; }
.client-item:nth-child(6) { animation-delay: 0.35s; }
.client-item:nth-child(7) { animation-delay: 0.4s; }
.client-item:nth-child(8) { animation-delay: 0.45s; }

/* Sección CTA */
#cta {
  background-color: var(--primary-color);
  color: #ffffff;
  text-align: center;
  padding: 80px 20px;
}

#cta h2 {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 1em;
  font-family: 'Rubik', sans-serif;
}

#cta p {
  max-width: 600px;
  margin: 0 auto 1.5em;
}

/* Footer */
footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e5e5;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  color: #555555;
  font-size: 0.9rem;
}

.footer-container a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-container a:hover {
  text-decoration: underline;
}

/* Páginas internas */
.about, .contact {
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
}

/* Sección de contacto */
#contact-section {
  background-color: #ffffff;
  padding: 80px 20px;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Información de contacto */
.contact-info h2 {
  color: var(--primary-color);
  font-family: 'Rubik', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 2em;
  text-align: left;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 2.5em;
  padding: 25px;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.contact-item.featured {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
}

.contact-item:not(.featured) {
  background: rgba(11, 94, 215, 0.03);
  border: 1px solid rgba(11, 94, 215, 0.1);
}

.contact-item:not(.featured):hover {
  background: rgba(11, 94, 215, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(11, 94, 215, 0.1);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-color);
}

.contact-item.featured .contact-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.contact-icon.whatsapp {
  background: rgba(255, 255, 255, 0.2);
}

.contact-details h3 {
  margin: 0 0 8px 0;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: inherit;
}

.contact-item:not(.featured) .contact-details h3 {
  color: var(--primary-color);
}

.contact-details p {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.4;
}

.contact-details a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-item:not(.featured) .contact-details a {
  color: var(--primary-color);
}

.contact-item:not(.featured) .contact-details a:hover {
  text-decoration: underline;
}

.whatsapp-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 700;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.whatsapp-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
  text-decoration: none !important;
}

/* Formulario de contacto */
.contact-form h2 {
  color: var(--primary-color);
  font-family: 'Rubik', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1.5em;
  text-align: left;
}

.form-group {
  margin-bottom: 1.5em;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid rgba(11, 94, 215, 0.1);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #ffffff;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.1);
}

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

.submit-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Rubik', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(11, 94, 215, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-note {
  margin-top: 1.5em;
  text-align: center;
}

.form-note p {
  margin: 5px 0;
  color: #666;
  font-size: 0.85rem;
}

.form-status {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.form-status p {
  margin: 10px 0;
  font-size: 0.95rem;
}

.form-status a {
  font-weight: bold;
  text-decoration: underline;
}

/* Responsive para contacto */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .contact-item {
    padding: 20px;
    margin-bottom: 1.5em;
  }
  
  .contact-item.featured {
    transform: none;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
  }
  
  .contact-details h3 {
    font-size: 1.1rem;
  }
  
  .contact-form h2,
  .contact-info h2 {
    font-size: 1.5rem;
  }
}

.about h1, .contact h1 {
  text-align: center;
  color: var(--primary-color);
  font-family: 'Rubik', sans-serif;
  margin-bottom: 1em;
}

/* Responsividad */
@media (max-width: 768px) {
  #hero {
    padding: 60px 20px;
    background-attachment: scroll; /* Mejor rendimiento en móvil */
  }
  
  #hero h1 {
    font-size: 2.3rem;
  }
  #hero h2 {
    font-size: 1.3rem;
  }
  
  .hero-stats {
    gap: 30px;
    margin: 2em 0;
  }
  
  .stat-item {
    min-width: 120px;
    padding: 20px 15px;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .btn {
    padding: 12px 28px;
    font-size: 0.9rem;
  }
  
  /* Hero de páginas internas - móvil */
  #page-hero h1 {
    font-size: 2rem;
  }
  
  #page-hero .hero-subtitle {
    font-size: 1rem;
  }
  
  /* Hero mejorado - móvil */
  .hero-description {
    text-align: center;
  }
  
  .hero-stats {
    gap: 30px;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  /* Qué hacemos - móvil */
  .pillars-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .pillar-card {
    padding: 30px 20px;
  }
  
  .pillar-icon {
    width: 100px;
    height: 100px;
  }
  
  /* Casos de éxito - móvil */
  .cases-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .case-card {
    padding: 25px 20px;
  }
  
  .case-icon {
    width: 80px;
    height: 80px;
  }
  
  .case-results {
    flex-direction: column;
    gap: 15px;
  }
  
  .result-number {
    font-size: 1.5rem;
  }
  
  /* Metodología - móvil */
  .methodology-steps {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    line-height: 50px;
  }
  
  .card,
  .suite-card {
    max-width: 100%;
  }
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  nav a {
    margin: 8px 0 0;
  }
  
  /* Carrusel horizontal responsivo */
  .clients-carousel-container {
    padding: 0 40px;
  }
  
  .clients-carousel-track {
    gap: 20px;
  }
  
  .client-item {
    flex: 0 0 180px;
    padding: 20px 15px;
  }
  
  .client-item img {
    width: 80px;
    height: 40px;
  }
  
  .client-item p {
    font-size: 0.85rem;
  }
  
  .client-item small {
    font-size: 0.75rem;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .carousel-btn.prev-btn {
    left: 5px;
  }
  
  .carousel-btn.next-btn {
    right: 5px;
  }
  
  .clients-carousel-container::before,
  .clients-carousel-container::after {
    width: 40px;
  }
}

/* ===== CARRUSEL DE CASOS DE ÉXITO ===== */
.success-carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
}

.success-carousel-wrapper {
  overflow: hidden;
  position: relative;
}

.success-carousel-track {
  display: flex;
  gap: 30px;
  transition: transform 0.5s ease;
  padding: 20px 0;
}

.success-case-card {
  flex: 0 0 350px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 450px;
  display: flex;
  flex-direction: column;
}

.success-case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.success-case-card .case-icon {
  text-align: center;
  margin-bottom: 20px;
}

.success-case-card .case-icon img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.success-case-card h3 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-align: center;
}

.success-case-card > p {
  color: #666;
  margin-bottom: 20px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}

.success-case-card .case-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.success-case-card .case-details h4 {
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  color: var(--primary-color);
  margin: 0 0 8px 0;
  font-size: 1rem;
}

.success-case-card .case-details p {
  margin: 0 0 15px 0;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Navegación del carrusel de casos de éxito */
.success-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.success-carousel-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(11, 94, 215, 0.3);
}

.success-carousel-btn:hover {
  background: var(--primary-color-dark);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(11, 94, 215, 0.4);
}

.success-carousel-btn.prev {
  margin-left: -25px;
}

.success-carousel-btn.next {
  margin-right: -25px;
}

/* Indicadores del carrusel de casos de éxito */
.success-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.success-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.success-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.success-dot:hover {
  background: var(--primary-color-dark);
}

/* Responsive para el carrusel de casos de éxito */
@media (max-width: 768px) {
  .success-case-card {
    flex: 0 0 280px;
    padding: 20px;
    min-height: 400px;
  }
  
  .success-case-card h3 {
    font-size: 1.1rem;
  }
  
  .success-case-card > p {
    font-size: 0.9rem;
  }
  
  .success-case-card .case-details p {
    font-size: 0.85rem;
  }
  
  .success-carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .success-carousel-btn.prev {
    margin-left: -20px;
  }
  
  .success-carousel-btn.next {
    margin-right: -20px;
  }
  
  .success-carousel-track {
    gap: 20px;
  }
}

/* ===== PÁGINA ACERCA DE ===== */
.about-image-section {
  padding: 60px 0;
  background: var(--light-bg);
}

.about-main-image {
  width: 100%;
  max-width: 1000px;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
  display: block;
}

.about {
  padding: 80px 0;
  background: white;
}

.about h2 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
}

.about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Mejorar rendimiento en móviles */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Optimizar animaciones para móviles */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mejorar hero para móviles */
#hero {
  /* ...existing code... */
  /* Deshabilitar parallax en móviles para mejor rendimiento */
  background-attachment: scroll;
}

@media (min-width: 768px) {
  #hero {
    background-attachment: fixed;
  }
}

/* Optimizar carruseles para touch */
.clients-carousel-track,
.success-carousel-track {
  /* ...existing code... */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Mejorar botones táctiles */
.carousel-btn,
.success-carousel-btn,
.btn,
.submit-btn {
  /* ...existing code... */
  min-height: 44px; /* Tamaño mínimo recomendado para touch */
  min-width: 44px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Optimizar imágenes para móviles */
img {
  max-width: 100%;
  height: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Mejorar rendimiento de gradientes en móviles */
.pillar-card,
.case-card,
.success-case-card {
  /* ...existing code... */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}