/* ========================================== */
/* PALETA DE COLORES CORPORATIVA - XPERTOS    */
/* ========================================== */
:root {
  --xpertos-red: #DC3545;
  --xpertos-red-hover: #B02A37;
  --xpertos-dark: #0F172A;
  --xpertos-light-glass: rgba(255, 255, 255, 0.92); /* Fondo translúcido moderno */
  --xpertos-border-glass: rgba(255, 255, 255, 0.3);
}


/* ========================================== */
/* SECCIONES A PANTALLA COMPLETA (PC & MÓVIL) */
/* ========================================== */

/* Reduce la distancia de margen al navegar por anclas (#inicio, #servicios, etc.) */
section, header {
  scroll-margin-top: 30px !important; /* Antes estaba en 70px, esto acerca ambas secciones */
  box-sizing: border-box;
}

/* Versión Escritorio (PC - a partir de 992px) */
@media (min-width: 992px) {
  header#inicio {
    height: 100vh !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* Centrado vertical automático en PC */
    align-items: center !important;
    padding-top: 80px !important;       /* Espacio para la barra de navegación fija */
    padding-bottom: 40px !important;
    overflow: hidden !important;
  }

  /* Aseguramos que el contenedor interno de inicio se expanda y distribuya bien en escritorio */
  header#inicio > .container {
    width: 100% !important;
    max-width: 1140px !important;       /* Ancho estándar corporativo de Bootstrap */
    margin-left: auto;
    margin-right: auto;
  }
}

/* Versión Móvil (hasta 991.98px) */
@media (max-width: 991.98px) {
  section, header {
    min-height: 100svh !important;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 30px;
  }
}


/* ========================================== */
/* NAVBAR & NAVEGACIÓN PRINCIPAL              */
/* ========================================== */


.navbar-collapse {
  background-color: transparent !important;
}

/* En móvil (por defecto): separación vertical compacta y limpia */
.navbar-nav {
  gap: 0.25rem !important;
}

/* En PC (992px+): separación horizontal amplia */
@media (min-width: 992px) {
  .navbar-nav {
    gap: 2.2rem !important;
  }
}

/* Estilo por defecto de los enlaces del menú */
.nav-link-scroll {
  display: inline-block;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: color 0.2s ease !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.95rem;
  padding: 0.35rem 0.25rem !important;
}

.nav-link-scroll:hover {
  color: #ffffff !important;
}

.nav-link-scroll.active {
  color: var(--xpertos-red, #dc3545) !important;
  font-weight: 500 !important;
}

/* Espaciado vertical cómodo para los enlaces cuando el menú hamburguesa se abre en móvil */
@media (max-width: 991.98px) {
  .navbar-collapse .navbar-nav .nav-item {
    margin-bottom: 0.5rem; 
  }
}
/* Estándar base idéntico para ambos botones */
.nav-btn-action {
  font-size: 0.8rem !important;
  letter-spacing: 0.3px;
  height: 38px;
  white-space: nowrap;
  transition: all 0.25s ease-in-out;
}

/* 1. Botón Postula Aquí (Estilo secundario limpio y oscuro con borde sutil) */
.nav-btn-postula {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.nav-btn-postula:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* 2. Botón Cotiza Servicios (Estilo principal rojo corporativo) */
.nav-btn-cotiza {
  background-color: var(--xpertos-red, #dc3545) !important;
  border: 1px solid var(--xpertos-red, #dc3545) !important;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
}

.nav-btn-cotiza:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.45) !important;
  color: #ffffff !important;
}


/* ========================================== */
/* ESTILOS Y TRANSICIONES PARA EL CARRUSEL B2B  */
/* ========================================== */

/* Contenedor general del Swiper con aceleración por hardware */
.b2bImageSwiper {
  overflow: visible !important;
  padding-bottom: 1rem !important; /* REDUCIDO: de 2.5rem a 1rem para eliminar el espacio vacío */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Forzar que los puntos de paginación queden compactos */
.b2bImageSwiper .swiper-pagination {
  position: relative !important;
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

/* Altura y optimización de renderizado para las tarjetas de servicios */
.service-card-img {
  min-height: 340px;
  will-change: transform, opacity; /* Prepara la GPU para animar instantáneamente */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: all 0.4s ease;
}

/* Transiciones fluidas y sin retrasos para los slides del carrusel 3D */
.b2bImageSwiper .swiper-slide {
  width: 300px;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s ease;
  opacity: 0.55;
  transform: scale(0.9) translateZ(0);
}

.b2bImageSwiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1.05) translateZ(0);
  z-index: 10;
}

/* Efecto hover sutil en el texto/enlace interno de la tarjeta */
.service-card-img .hover-danger:hover {
  color: var(--xpertos-red) !important;
  text-decoration: underline !important;
}

/* Estilización de los puntos de paginación de Swiper */
.swiper-pagination-bullet {
  background: #6c757d;
  opacity: 0.4;
  width: 10px;
  height: 10px;
  transition: all 0.3s ease;
}

/* Estado activo del punto de paginación */
.swiper-pagination-bullet-active {
  background: #dc3545 !important; /* Rojo corporativo de Xpertos */
  opacity: 1;
  width: 24px; /* Barra alargada elegante para el indicador activo */
  border-radius: 5px;
}

@media (max-width: 991.98px) {
  .service-card-img {
    height: 360px !important; /* Altura controlada para que la tarjeta no rebase la pantalla */
  }
}

/* Ajuste responsivo del ancho del carrusel según la pantalla */
@media (min-width: 992px) {
  .b2bImageSwiper {
    max-width: 440px !important; /* Ancho ideal y proporcionado para escritorio */
  }
}

/* Reduce drásticamente cualquier espacio superior en móviles para la sección de servicios */
@media (max-width: 991.98px) {
  #servicios {
    padding-top: 10px !important;    /* Mínimo espacio superior para que no choque con el navbar */
    padding-bottom: 10px !important;
  }
  
  #servicios .w-100 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ELIMINAR OPACIIDAD Y FILTROS EN SWIPER     */
/* Forzar opacidad completa y evitar atenuaciones en cualquier slide de Swiper */
.b2bImageSwiper .swiper-slide {
  opacity: 1 !important;
  filter: none !important;
}

/* Evitar que Swiper aplique capas oscuras o translúcidas automáticas en los slides inactivos */
.b2bImageSwiper .swiper-slide-shadow-left,
.b2bImageSwiper .swiper-slide-shadow-right,
.b2bImageSwiper .swiper-slide-shadow-coverflow {
  display: none !important;
}

/* Opcional: Si tienes alguna clase de opacidad en las tarjetas inactivas */
.b2bImageSwiper .swiper-slide:not(.swiper-slide-active) .card {
  opacity: 1 !important;
  background-color: transparent !important;
}


/* ========================================== */
/* ESTILOS PARA LA SECCIÓN TECNOLOGÍA (FIJO)  */
/* ========================================== */
/* Sección de tecnología ocupando exactamente toda la altura de la pantalla */
.tech-fixed-section {
  background-image: url('../img/tecnologia/fondo.webp');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 90vh; /* Se adapta perfectamente al contenido sin vacíos extraños */
}

/* Tarjetas 100% transparentes, sin bordes y sin fondo borroso */
.tech-card-transparent {
  background: transparent !important;
  border: none !important;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

/* Efecto hover limpio al pasar el mouse por las tarjetas transparentes */
.tech-card-transparent:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.05) !important; /* Toque sutil translúcido solo al hover */
}
/* ========================================== */
/* SECCIÓN TECNOLOGÍA: MÓVIL VS ESCRITORIO    */
/* ========================================== */
.tech-container-responsive {
  max-width: 440px;
}

.tech-subtitle {
  font-size: 0.76rem;
  line-height: 1.2;
}

.tech-card-transparent {
  min-height: 75px;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.tech-icon {
  font-size: 1.25rem;
}

.tech-card-title {
  font-size: 0.75rem;
  line-height: 1.15;
}

.tech-card-link {
  font-size: 0.62rem;
}

/* Escalado panorámico y centrado en PC (992px+) */
@media (min-width: 992px) {
  #tecnologia {
    padding-top: 70px !important; /* Compensa únicamente la altura del navbar fijo en PC */
  }

  .tech-container-responsive {
    max-width: 1040px !important; /* Expande el grid a lo ancho del monitor */
  }

  .tech-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .tech-card-transparent {
    min-height: 155px;
  }

  .tech-card-transparent:hover {
    transform: translateY(-4px);
    background-color: rgba(255, 255, 255, 0.06) !important;
  }

  .tech-icon {
    font-size: 2.1rem;
  }

  .tech-card-title {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .tech-card-link {
    font-size: 0.8rem;
  }
}


/* ========================================== */
/* TECNOLOGIA OFFCANVA     */
/* ========================================== */
@media (min-width: 992px) {
  #offcanvasTecnologia {
    top: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    right: 0 !important;
    width: 520px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 1060 !important;
    border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15) !important;
    
    /* Estado inicial (oculto hacia la derecha) con transición suave */
    transform: translateX(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* Estado cuando está completamente abierto */
  #offcanvasTecnologia.show {
    transform: translateX(0) !important;
  }

  /* Estado crítico: cuando Bootstrap procesa el cierre (evita el corte brusco) */
  #offcanvasTecnologia.hiding,
  #offcanvasTecnologia.offcanvas.hiding {
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}
/* ========================================== */
/* SUPERPOSICIÓN DEL OFFCANVAS SOBRE NAVBAR   */
/* ========================================== */
#offcanvasTecnologia {
  z-index: 1060 !important; /* Supera el z-index del navbar fijo (1030/1050) */
}

/* Si activas el backdrop oscuro de Bootstrap, asegúrate de que quede justo debajo del offcanvas */
.offcanvas-backdrop {
  z-index: 1055 !important;
}

/* ========================================== */
/* ESTILOS DE NAVEGACIÓN TABS ESTILO WIX      */
/* ========================================== */
#uneteTabs .nav-link {
  position: relative;
  transition: color 0.25s ease;
}

/* Color y subrayado elegante para la pestaña activa */
#uneteTabs .nav-link.active {
  color: #000000 !important;
  font-weight: 700 !important;
}

#uneteTabs .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #000000; /* Línea indicadora minimalista negra */
  border-radius: 2px;
}

/* Ocultar barra de scroll en móviles manteniendo el desplazamiento táctil */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}


/* ========================================== */
/* UNETE AL EQUIPO    */
/* ========================================== */
/* Asegura que el scroll horizontal de las pestañas inicie con un pequeño margen izquierdo en celus */
@media (max-width: 991.98px) {
  #unete .overflow-x-auto {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}



/* ========================================== */
/* SECCIÓN CONTACTO: MÓVIL VS ESCRITORIO      */
/* ========================================== */
.contact-container-responsive {
  max-width: 850px;
}

.contact-card-responsive {
  max-width: 750px;
}

.contact-subtitle {
  font-size: 0.8rem;
  line-height: 1.35;
}

.contact-icon-circle {
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
}

.contact-item-title {
  font-size: 0.85rem;
}

.contact-item-text {
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Escalado panorámico y corporativo en PC (992px+) */
@media (min-width: 992px) {
  #contacto {
    padding-top: 70px !important; /* Compensa la barra fija superior */
  }

  .contact-container-responsive {
    max-width: 1080px !important;
  }

  .contact-card-responsive {
    max-width: 1040px !important;
  }

  .contact-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }

  .contact-icon-circle {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .contact-item-title {
    font-size: 1.05rem;
    margin-bottom: 0.4rem !important;
  }

  .contact-item-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}


/* ========================================== */
/* ENLACES DE WHATSAPP EN CONTACTO (2 COLS)   */
/* ========================================== */
.wa-contact-grid {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.wa-phone-col {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.wa-contact-icon {
  color: #25D366;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.wa-number-link,
.wa-number-link:link,
.wa-number-link:visited {
  color: #198754 !important;
  font-weight: 700;
  text-decoration: none !important;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.wa-number-link:hover,
.wa-number-link:focus,
.wa-number-link:active {
  color: #128C7E !important;
  text-decoration: none !important;
}

.wa-contact-role {
  color: #6c757d;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

@media (min-width: 992px) {
  .wa-contact-icon {
    font-size: 1.15rem;
  }

  .wa-number-link,
  .wa-number-link:link,
  .wa-number-link:visited {
    font-size: 0.92rem;
  }

  .wa-contact-role {
    font-size: 0.85rem;
  }
}

/* ========================================== */
/* FOOTER    */
/* ========================================== */
.hover-white:hover {
  color: #ffffff !important;
  transition: color 0.2s ease;
}

/* Línea decorativa roja bajo los títulos del footer */
.footer-title-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 35px;
  height: 2px;
  background-color: var(--xpertos-red); /* Usamos el rojo oficial */
}

/* Efecto hover en los enlaces del footer */
.footer-link:hover {
  color: #ffffff !important;
  transition: color 0.2s ease;
}

/* Efecto hover en los iconos circulares de redes sociales */
.footer-social-icon {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-social-icon:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

/* Enlaces de redes sociales limpios en el footer */
.footer-social-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover {
  color: var(--xpertos-red) !important;
  transform: translateY(-2px);
}