/* 
 * DOJA S.A.S - Styles CSS
 * Estilos separados del HTML principal
 */

:root {
  --primary-color: #2c5aa0;
  --secondary-color: #ffc107;
  --light-bg: #f8f9fa;
  --dark-text: #2c3e50;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
}

/* ===== NAVBAR ===== */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background-color: var(--primary-color) !important;
}

.navbar-light .navbar-nav .nav-link {
  color: white !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--secondary-color) !important;
}

.navbar-light .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand img {
  height: 50px;
  transition: transform 0.3s ease;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.onac-badge {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--primary-color);
}

.nav-link {
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

/* ===== BOTONES ===== */
.btn-custom-primary {
  background: linear-gradient(135deg, var(--secondary-color), #ffb300);
  border: none;
  color: var(--dark-text);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.btn-custom-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.6);
  color: var(--dark-text);
}

.btn-outline-custom {
  border: 2px solid white;
  color: white;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-outline-custom:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* ===== UTILIDADES ===== */
.bg-light-custom {
  background-color: var(--light-bg);
}

.section-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--secondary-color), #ffb300);
  border-radius: 2px;
}

.section-title.text-start::after {
  left: 0;
  transform: none;
}

/* ===== TABS ===== */
.nav-pills .nav-link {
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
  background: var(--primary-color);
}

.tab-content-custom {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== SERVICE CARDS ===== */
/* Estilos para las tarjetas clickeables */
.service-card-link {
  text-decoration: none !important;
  color: inherit;
  display: block;
  height: 100%;
  transition: none; /* Removemos la transición del link para que use la del .service-card */
}

.service-card-link:hover {
  text-decoration: none !important;
  color: inherit;
}

.service-card-link:focus {
  text-decoration: none !important;
  outline: none;
}

.service-card-link:visited {
  text-decoration: none !important;
  color: inherit;
}

.service-card-link:active {
  text-decoration: none !important;
  color: inherit;
}

/* Asegurar que no haya subrayado en ningún elemento dentro del enlace */
.service-card-link * {
  text-decoration: none !important;
}

/* Mantenemos tu CSS existente de .service-card y agregamos cursor pointer */
.service-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  height: 100%;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--secondary-color);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), #1e3d72);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.service-icon i {
  font-size: 1.8rem;
  color: white;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(44, 90, 160, 0.3);
}

/* ===== ESTILOS PARA CLIENTES MEJORADOS ===== */
.clients-section {
  padding: 5rem 0;
  background: var(--light-bg);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  align-items: center;
  justify-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.client-item {
  position: relative;
  width: 240%;
  height: 240px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.client-logo-container {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 20px; /* Cambiar a bordes redondeados en lugar de círculo */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  padding: 0px;
  border: 2px solid #f0f0f0;
}

.client-logo-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  transition: left 0.6s ease;
}

.client-logo-container::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid transparent;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: exclude;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.client-item:hover .client-logo-container {
  transform: scale(1.1) rotate(3deg); /* Agregar rotación sutil */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.client-item:hover .client-logo-container::before {
  left: 100%;
}

.client-item:hover .client-logo-container::after {
  opacity: 1;
}

.client-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.4s ease;
  filter: grayscale(20%) brightness(1.1);
  border-radius: 50%;
}

/* Ajustes específicos por cliente para optimizar la visualización */
.client-item:nth-child(1) .client-logo {
  /* Chevron */
  max-width: 85%;
}

.client-item:nth-child(2) .client-logo {
  /* Biomax */
  max-width: 90%;
}

.client-item:nth-child(3) .client-logo {
  /* Terpel */
  max-width: 80%;
}

.client-item:nth-child(4) .client-logo {
  /* Primax */
  max-width: 85%;
}

.client-item:nth-child(5) .client-logo {
  /* Cencosud */
  max-width: 75%;
}

.client-item:hover .client-logo {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

.client-name {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-color), #1e3d72);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.client-name::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid var(--primary-color);
}

.client-item:hover .client-name {
  opacity: 1;
  bottom: -40px;
  transform: translateX(-50%) translateY(0);
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    left: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 1.5rem;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    animation: pulse 2s infinite;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    background-color: #1da851;
    color: white;
    transform: scale(1.1);
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===== ANIMACIONES ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Animación de pulso mejorada */
@keyframes pulseGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(44, 90, 160, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  }
}

.client-item:active .client-logo-container {
  animation: pulseGlow 0.4s ease;
}

/* Efecto de carga para las imágenes */
.client-logo {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.client-logo.loaded {
  opacity: 1;
}

/* Placeholder mientras cargan las imágenes */
.client-logo-container.loading {
  background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  animation: loadingAnimation 1s linear infinite;
}

@keyframes loadingAnimation {
  0% {
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  }
  100% {
    background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px;
  }
}

/* ===== UTILIDADES ADICIONALES ===== */
.hover-warning:hover {
  color: var(--secondary-color) !important;
  transition: color 0.3s ease;
}

/* Breadcrumb para página de servicios */
.breadcrumb-custom {
  background: var(--light-bg);
  padding: 1rem 0;
  margin-bottom: 0;
}

.breadcrumb-custom .breadcrumb {
  background: none;
  margin-bottom: 0;
}

.breadcrumb-custom .breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: #6c757d;
}

/* Estilos para página de servicios */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.services-tabs .nav-pills {
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.services-tabs .nav-link {
  margin: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .clients-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }

  .client-item {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 992px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 600px;
  }

  .client-item {
    width: 130px;
    height: 130px;
  }
}

@media (max-width: 768px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 400px;
  }

  .client-item {
    width: 120px;
    height: 120px;
  }

  .client-name {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .services-tabs .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 576px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .client-item {
    width: 100px;
    height: 100px;
  }

  .client-logo-container {
    padding: 12px;
  }

  .client-name {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    bottom: -30px;
  }

  .client-item:hover .client-name {
    bottom: -35px;
  }
  
  .services-tabs .nav-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
}