/*--------------------------------------------------------------
# Variables y Estilos Generales
--------------------------------------------------------------*/
:root {
  --primary-color: #2a6aa4; /* Azul corporativo */
  --secondary-color: #0a8b90; /* Verde azulado corporativo */
  --tertiary-color: #facc15; /* Amarillo corporativo */
  --light-color: #ffffff; /* Blanco para fondos claros */
  --light-alt-color: #f8f9fc; /* Gris azulado muy claro para fondos alternos */
  --dark-color: #212529; /* Negro suave */
  --dark-alt-color: #1a1f23; /* Gris oscuro para footer */
  --text-muted: #6c757d;
  --font-default: 'Poppins', sans-serif;
}

body {
  font-family: var(--font-default);
  position: relative;
  color: var(--dark-color);
  background-color: var(--light-color); /* Fondo base blanco */
}

/* Smooth Scroll Nativo */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Ajusta al tamaño de tu navbar fija */
}


h1, h2, h3, h4, h5, h6 {
   font-weight: 600;
   color: var(--primary-color); /* Títulos primarios en azul por defecto */
}
h3 { color: var(--secondary-color); } /* Ejemplo: h3 en secundario */

/* Colores de Texto y Fondo */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-tertiary { color: var(--tertiary-color) !important; }
.text-primary-dark { color: #1e4f7a !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-tertiary { background-color: var(--tertiary-color) !important; }
.bg-light { background-color: var(--light-color) !important; }
.bg-alt { background-color: var(--light-alt-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.bg-dark-alt { background-color: var(--dark-alt-color) !important; }


/* Botones */
.btn {
    border-radius: 50px; /* Botones más redondeados */
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-lg { padding: 12px 30px; font-size: 1rem; }

.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: #1e4f7a; border-color: #1e4f7a; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(42, 106, 164, 0.3); }

.btn-secondary { background-color: var(--secondary-color); border-color: var(--secondary-color); color: #fff; }
.btn-secondary:hover { background-color: #076c70; border-color: #076c70; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(10, 139, 144, 0.3); }

.btn-warning { background-color: var(--tertiary-color); border-color: var(--tertiary-color); color: var(--primary-color) !important; }
.btn-warning:hover { background-color: #eab308; border-color: #eab308; color: var(--primary-color) !important; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(250, 204, 21, 0.3); }

.btn-outline-light { border-color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8); border-width: 2px; }
.btn-outline-light:hover { background-color: var(--light-color); color: var(--primary-color) !important; border-color: var(--light-color); }


/*--------------------------------------------------------------
# Navigation Menu - Moderno y Minimalista
--------------------------------------------------------------*/
#mainNav {
  /* background-color: var(--light-color); Ya definido en la clase .bg-light */
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition: all 0.3s ease; /* Transición suave para padding/shadow */
}

#mainNav .navbar-brand img {
  transition: transform 0.3s ease;
}
#mainNav .navbar-brand:hover img {
    transform: scale(1.05);
}

#mainNav .nav-link {
  color: var(--dark-color); /* Texto oscuro sobre fondo claro */
  padding: 0.5rem 1rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}
/* Efecto subrayado sutil al pasar el ratón */
#mainNav .nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}
#mainNav .nav-link:hover::before,
#mainNav .nav-link.active::before {
    visibility: visible;
    width: 70%; /* Ancho del subrayado */
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--primary-color); /* Color primario al pasar el ratón o activo */
}

/* Ajuste del navbar en scroll (opcional, si quieres que se encoja un poco) */
/*
#mainNav.navbar-scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
*/

/* Toggler icon color */
.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(42, 106, 164, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-toggler {
    border-color: rgba(42, 106, 164, 0.1);
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(42, 106, 164, 0.25);
}


/*--------------------------------------------------------------
# Hero Section with Video
--------------------------------------------------------------*/
.hero-section {
  position: relative;
  height: 90vh; /* Altura ajustada para video */
  min-height: 600px;
  /* background: url('../img/fondo.png') no-repeat center center; */ /* Removido */
  /* background-size: cover; */ /* Removido */
  display: flex;
  align-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden; /* Asegura que el video/overlay no se desborde */
}

.video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Detrás del overlay y contenido */
    overflow: hidden;
    background-color: #333; /* Color de fondo mientras carga el video */
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover; /* Cubre todo el área */
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Transición suave */
    z-index: 1; /* Encima del contenedor pero debajo del overlay */
}

.video-bg.active {
    opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(45deg, rgba(42, 106, 164, 0.65), rgba(10, 139, 144, 0.65)); /* Ligero ajuste de opacidad si es necesario */
  z-index: 1; /* Encima de los videos, debajo del texto */
}

.hero-section .container {
  position: relative;
  z-index: 2; /* Encima del overlay */
}

/* Estilos para los bloques de contenido del Hero */
.hero-content {
    position: absolute; /* Permite superponerlos */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centrado perfecto */
    width: 90%; /* Ancho del contenido */
    max-width: 800px; /* Ancho máximo */
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none; /* Evita interacción con bloques ocultos */
    z-index: 3; /* Encima de todo */
}

.hero-content.active {
    opacity: 1;
    pointer-events: auto; /* Permite interacción con bloque activo */
}

/* Animación Splitting en cada cambio de slide */
.hero-content.active [data-splitting] .char,
.hero-content.active [data-splitting="words"] .char {
    animation: none; /* Reset animation */
    /* Optionally force reflow */
    /* void this.offsetWidth; */
}

.hero-content.active [data-splitting="chars"] .char {
  animation: revealChar 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
  animation-delay: calc(0.02s * var(--char-index));
}

.hero-content.active [data-splitting="words"] .char {
   animation: revealWordChar 0.6s cubic-bezier(0.6, 0, 0.4, 1) forwards;
   animation-delay: calc(0.015s * var(--char-index));
}


.hero-section h1,
.hero-section h2,
.hero-section .lead {
    color: #fff; /* Asegura blanco en texto */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6); /* Sombra más pronunciada para legibilidad */
}


/*--------------------------------------------------------------
# Sections General Styling
--------------------------------------------------------------*/
section {
  overflow: hidden; /* Previene desbordamientos */
  padding: 80px 0; /* Espaciado estándar */
}
#inicio { padding: 0; } /* Hero no necesita padding */

/* Efecto Zoom suave */
.zoom-hover { transition: transform 0.3s ease; }
.zoom-hover:hover { transform: scale(1.05); }

/*--------------------------------------------------------------
# Nosotros Section
--------------------------------------------------------------*/
#nosotros .display-1 { font-size: 5rem; } /* Tamaño de iconos grandes */


/*--------------------------------------------------------------
# Servicios Section
--------------------------------------------------------------*/
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem; /* Espacio debajo del icono */
}
.icon-circle i { line-height: 0; } /* Alineación vertical icono */

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none !important; /* Quita borde por defecto */
}
.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(42, 106, 164, 0.1) !important; /* Sombra azul suave al hover */
}
/* Asegurar altura igual en tarjetas en la misma fila */
#servicios .row, #marcas .row, #aplicaciones .row {
    display: flex;
    flex-wrap: wrap;
}
#servicios .col-md-4, #marcas .col-lg-5, #aplicaciones .col-lg-2 {
    display: flex;
    align-items: stretch; /* Hace que las columnas tengan la misma altura */
}
#servicios .card, #marcas .card, #aplicaciones .app-icon-box {
    width: 100%; /* Asegura que el contenido interno ocupe toda la columna */
}


/*--------------------------------------------------------------
# Marcas Section
--------------------------------------------------------------*/
#marcas .card {
    transition: border-color 0.3s ease;
}
#marcas .card:hover {
    border-color: var(--tertiary-color) !important;
}
#marcas img {
    filter: grayscale(70%) opacity(0.8); /* Logos más sutiles */
    transition: filter 0.3s ease;
}
#marcas .card:hover img {
    filter: grayscale(0%) opacity(1); /* Color completo al pasar el ratón */
}

/*--------------------------------------------------------------
# Insights Section (Charts)
--------------------------------------------------------------*/
.chart-container {
    min-height: 300px; /* Altura mínima para evitar colapso antes de cargar */
    position: relative;
}
/* Estilos específicos de ApexCharts si es necesario */
.apexcharts-tooltip {
    background: #333 !important;
    color: #fff;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-radius: 5px;
}
.apexcharts-tooltip .apexcharts-tooltip-title {
    background: #444 !important;
    border-bottom: 1px solid #555 !important;
    padding: 8px 10px;
}
.apexcharts-tooltip-series-group {
    padding: 5px 10px;
}


/*--------------------------------------------------------------
# Productos Section (Accordion)
--------------------------------------------------------------*/
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden; /* Para que el borde redondeado funcione */
}
.accordion-header { margin-bottom: 0; }

.accordion-button {
    background-color: var(--light-color);
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border: none;
    box-shadow: none !important; /* Quitar sombra de foco */
}
.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}
.accordion-button:not(.collapsed)::after { /* Cambiar color flecha */
     background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.accordion-button:not(.collapsed) i {
    color: var(--tertiary-color) !important;
}
.accordion-body {
    padding: 1.5rem;
    background-color: #fff; /* Fondo blanco dentro del acordeón */
}
.accordion-body .list-group-item {
    border: none;
    padding: 0.75rem 0;
    background-color: transparent;
    transition: transform 0.2s ease;
}
.accordion-body .list-group-item:hover {
    transform: translateX(5px);
}
.accordion-body .list-group-item i {
    width: 30px;
    text-align: center;
    margin-right: 0.75rem; /* Espacio icono-texto */
}


/*--------------------------------------------------------------
# Aplicaciones Section
--------------------------------------------------------------*/
.app-icon-box {
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra contenido verticalmente */
    align-items: center; /* Centra contenido horizontalmente */
    padding: 1.5rem 1rem; /* Más padding */
    border-radius: 0.5rem; /* Bordes redondeados */
}
.app-icon-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(42, 106, 164, 0.12) !important;
}
.app-icon-box i {
    transition: color 0.3s ease;
    margin-bottom: 0.75rem; /* Espacio icono-texto */
}
.app-icon-box:hover i {
    color: var(--primary-color) !important;
}
.app-icon-box p { line-height: 1.2; }


/*--------------------------------------------------------------
# Contacto Section
--------------------------------------------------------------*/
.contact-section {
    /* Reemplaza '...' con una URL de imagen de fondo apropiada si quieres */
    background: linear-gradient(rgba(42, 106, 164, 0.9), rgba(10, 139, 144, 0.9)), url('...') center center;
    background-size: cover;
    background-attachment: fixed;
    padding: 100px 0; /* Más padding */
}
.contact-section h2 { color: #fff; }
.contact-section .lead { color: rgba(255, 255, 255, 0.8); }
.contact-section .btn-light {
    color: var(--secondary-color) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.contact-section .btn-light:hover {
    background-color: #f8f9fa;
    opacity: 0.95;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}


/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
footer a:hover {
    color: #fff !important;
    text-decoration: underline;
}

/*--------------------------------------------------------------
# WhatsApp Float Button
--------------------------------------------------------------*/
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1030;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #128C7E;
    color: #FFF;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.4);
}


/*--------------------------------------------------------------
# GDPR Consent Banner
--------------------------------------------------------------*/
#gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 37, 41, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1050;
    display: none;
    transition: transform 0.5s ease-out;
    transform: translateY(100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#gdpr-banner.show {
    /* display: block; */ /* No es necesario si se usa transform */
    transform: translateY(0);
}
#gdpr-banner p { margin-bottom: 0; color: rgba(255, 255, 255, 0.8); }
#gdpr-banner a { text-decoration: underline; }
#gdpr-banner a:hover { color: #fff !important; }


/*--------------------------------------------------------------
# Efectos (Splitting, Tilt)
--------------------------------------------------------------*/
/* Animación Splitting.js */
[data-splitting] .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.8) rotate(5deg);
  /* animation: revealChar 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards; */ /* Animación se aplica desde JS */
  /* animation-delay: calc(0.02s * var(--char-index)); */
}
[data-splitting="words"] .word {
   display: inline-block;
   overflow: hidden;
}
[data-splitting="words"] .char {
   transform: translateY(100%);
   opacity: 1;
   /* animation: revealWordChar 0.6s cubic-bezier(0.6, 0, 0.4, 1) forwards; */ /* Animación se aplica desde JS */
   /* animation-delay: calc(0.015s * var(--char-index)); */
   transform-origin: bottom;
   rotate: 0deg; /* Reset rotate for word reveal */
}

@keyframes revealChar {
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}
@keyframes revealWordChar {
   to {
      transform: translateY(0);
   }
}

/* Tilt.js ajuste */
[data-tilt] {
    transform-style: preserve-3d;
    will-change: transform;
}
/* Evitar corte por contenedores */
.card[data-tilt], .app-icon-box[data-tilt], .list-group-item[data-tilt] {
    transform: perspective(1000px); /* Añadir perspectiva */
}
/* Añadir padding a columnas para que el tilt no se corte */
.col-md-4, .col-lg-5, .col-lg-2 {
    padding-top: 10px;
    padding-bottom: 10px;
}


/*--------------------------------------------------------------
# Responsive Adjustments
--------------------------------------------------------------*/
@media (max-width: 991.98px) {
    html { scroll-padding-top: 60px; /* Ajustar si navbar es más pequeña */ }
    .hero-section { height: auto; min-height: 75vh; padding-top: 100px; padding-bottom: 60px; }
    .hero-section h1 { font-size: 2.8rem; }
    .hero-section h2 { font-size: 1.2rem; }
    .chart-container { min-height: 250px; }
    .hero-content { width: 95%; } /* Ajustar ancho de contenido en pantallas medianas */

}

@media (max-width: 767.98px) {
    section { padding: 60px 0; }
    h2.display-5 { font-size: 2rem; }
    .hero-section { min-height: 70vh; }
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section .lead { font-size: 1rem; max-width: 90%; }
    .hero-section .btn { margin-bottom: 0.75rem; display: inline-block; margin-left: 0.25rem; margin-right: 0.25rem;}
    .hero-section .btn-lg { padding: 10px 20px; font-size: 0.9rem; }
    .hero-section .btn.me-3 { margin-right: 0.25rem !important; } /* Quitar margen extra */

    #insights .col-lg-7, #insights .col-lg-5 { text-align: center; }
    #insights .row { flex-direction: column-reverse; } /* Gráficas arriba en móvil */
    .chart-container { margin-bottom: 2rem; }

    #gdpr-banner { display: block; } /* Asegurar que display: block no interfiera con la animación inicial */
    #gdpr-banner .container { flex-direction: column; text-align: center; }
    #gdpr-banner p { margin-bottom: 1rem !important; margin-right: 0 !important; }

    .whatsapp-float { width: 50px; height: 50px; font-size: 24px; bottom: 15px; right: 15px; }
}

/* Fix para GDPR banner inicial */
@media (min-width: 768px) {
    #gdpr-banner {
        display: block; /* O flex si el contenedor interno lo necesita */
    }
}