/* Estilos generales del cuerpo */
html {
    scroll-behavior: smooth; /* Habilita el desplazamiento suave para toda la página */
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    /* Fondo con gradiente animado */
    background: linear-gradient(-45deg, #2D2E83, #008D36, #2D2E83, #008D36);
    background-size: 400% 400%;
    animation: gradient-animation 20s ease infinite;
}

/* Animación del gradiente del fondo */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- ESTILOS DE NAVEGACIÓN --- */
#main-nav {
    background-color: transparent; /* Fondo inicial transparente */
}

#main-nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 15, 25, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.nav-link.active, .mobile-nav-link.active {
    background-color: #008D36;
    color: white;
}

/* Estilo para el menú móvil desplegado */
#mobile-menu {
    background-color: rgba(10, 15, 25, 0.98);
}


/* Margen para anclaje de scroll */
.scroll-mt-20 {
    scroll-margin-top: 80px; /* Ajusta este valor según la altura de tu nav */
}


/* --- OTROS ESTILOS --- */

/* Contenedor del canvas para el fondo animado */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Se asegura que esté detrás de todo */
}

/* Estilo para el efecto de "cristal esmerilado" en las tarjetas */
.glass-card {
    background: rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animación para la aparición de elementos en el scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para el contenedor del video responsivo */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Proporción 16:9 para videos */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Estilos adicionales para las tablas */
.table-auto th, .table-auto td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap; /* Evita que el texto de la tabla se rompa en varias líneas */
}

.table-auto tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05); /* Ligeras rayas de cebra para las filas */
}

/* Colores dinámicos para las cabeceras de las tablas */
.table-header-yellow {
    background-color: rgba(234, 179, 8, 0.3); /* Amarillo semitransparente */
}

.table-header-blue {
    background-color: rgba(59, 130, 246, 0.3); /* Azul semitransparente */
}

.table-header-red {
    background-color: rgba(239, 68, 68, 0.3); /* Rojo semitransparente */
}

/* Indicador de scroll horizontal en tablas para móvil */
@media (max-width: 768px) {
    .overflow-x-auto::-webkit-scrollbar {
        height: 4px;
    }
    .overflow-x-auto::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
    .overflow-x-auto::-webkit-scrollbar-track {
        background-color: rgba(0, 0, 0, 0.1);
    }
    .overflow-x-auto {
       scrollbar-width: thin;
       scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
    }
}
