/* =========================================================
   CLIENTES - HA INGENIEROS
   Diseño corporativo para showcase de clientes
========================================================= */

/* -------------------------------
   ESTRUCTURA GENERAL
------------------------------- */
.clientes-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* -------------------------------
   HEADER DE CLIENTES
------------------------------- */
.clientes-header {
  text-align: center;
  margin-bottom: 80px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.clientes-header h1 {
  font-size: 3rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 20px;
}

html[data-theme="dark"] .clientes-header h1 {
  color: var(--primary);
}

/* Línea decorativa bajo el título */
.clientes-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 4px;
  width: 100px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 2px;
}

.clientes-header p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-top: 30px;
}

/* -------------------------------
   GRID DE LOGOS
------------------------------- */
.clientes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 80px;
}

.cliente-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}

.cliente-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.cliente-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.cliente-card:hover::before {
  transform: scaleX(1);
}

.cliente-logo {
  width: 100%;
  height: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all var(--transition);
}

.cliente-card:hover .cliente-logo {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* Placeholder para logos sin imagen */
.cliente-placeholder {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.cliente-placeholder svg {
  width: 60px;
  height: 60px;
  opacity: 0.3;
}

/* -------------------------------
   TESTIMONIOS (OPCIONAL)
------------------------------- */
.testimonios-section {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 60px 50px;
  box-shadow: var(--shadow-md);
  margin-bottom: 80px;
}

.testimonios-section h2 {
  font-size: 2.5rem;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 50px;
}

html[data-theme="dark"] .testimonios-section h2 {
  color: var(--primary);
}

.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.testimonio-card {
  background: var(--bg-muted);
  padding: 30px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  transition: all var(--transition);
}

.testimonio-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
}

.testimonio-text {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

.testimonio-author {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}

.testimonio-company {
  font-size: 0.9rem;
  color: var(--primary);
}

/* -------------------------------
   STATS SECTION
------------------------------- */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* -------------------------------
   CTA SECTION
------------------------------- */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  color: white;
}

.cta-section h2 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: white;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* -------------------------------
   RESPONSIVE
------------------------------- */
@media (max-width: 968px) {
  .clientes-main {
    padding: 40px 20px;
  }

  .clientes-header h1 {
    font-size: 2.2rem;
  }

  .clientes-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
  }

  .cliente-card {
    padding: 30px;
    min-height: 180px;
  }

  .testimonios-section {
    padding: 40px 30px;
  }

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

  .cta-section {
    padding: 40px 30px;
  }

  .cta-section h2 {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .clientes-header h1 {
    font-size: 1.8rem;
  }

  .clientes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cliente-card {
    padding: 25px;
    min-height: 150px;
  }

  .testimonios-section {
    padding: 30px 20px;
  }

  .testimonios-section h2 {
    font-size: 2rem;
  }

  .stats-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .cta-section {
    padding: 30px 20px;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }
}

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

.cliente-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.cliente-card:nth-child(1) { animation-delay: 0.1s; }
.cliente-card:nth-child(2) { animation-delay: 0.15s; }
.cliente-card:nth-child(3) { animation-delay: 0.2s; }
.cliente-card:nth-child(4) { animation-delay: 0.25s; }
.cliente-card:nth-child(5) { animation-delay: 0.3s; }
.cliente-card:nth-child(6) { animation-delay: 0.35s; }
.cliente-card:nth-child(7) { animation-delay: 0.4s; }
.cliente-card:nth-child(8) { animation-delay: 0.45s; }
.cliente-card:nth-child(9) { animation-delay: 0.5s; }
.cliente-card:nth-child(10) { animation-delay: 0.55s; }
.cliente-card:nth-child(11) { animation-delay: 0.6s; }
.cliente-card:nth-child(12) { animation-delay: 0.65s; }
