/**
 * principal.css
 * Archivo principal de estilos de NocturnoPOS
 * Importa todos los módulos CSS en el orden correcto
 */

/* ===== BASE ===== */
@import url('base/variables.css');
@import url('base/reset.css');
@import url('base/tipografia.css');

/* ===== UTILIDADES ===== */
@import url('utilidades/ayudas.css');
@import url('utilidades/animaciones.css');
@import url('utilidades/responsive.css');

/* ===== DISPOSICIÓN ===== */
@import url('disposicion/rejilla.css');
@import url('disposicion/encabezado.css');
@import url('disposicion/secciones.css');
@import url('disposicion/pie-de-pagina.css');

/* ===== COMPONENTES ===== */
@import url('componentes/botones.css');
@import url('componentes/tarjetas.css');
@import url('componentes/formularios.css');
@import url('componentes/navegacion.css');

/* ===== TEMAS ===== */
@import url('temas/nocturno.css');

/* Estilos base del body */
body {
    background: var(--fondo-profundo);
    color: var(--texto-principal);
    font-family: var(--fuente-principal);
    position: relative;
    overflow-x: hidden;
}

/* Fondo de partículas (se crea con JS pero tiene estilos base) */
.particulas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particula {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primario-soft), var(--cian-soft));
    opacity: 0.15;
    animation: flotar 15s infinite ease-in-out;
    filter: blur(1px);
}

@keyframes flotar {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Barra de progreso de scroll */
.barra-progreso {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primario), var(--cian), var(--acento));
    z-index: var(--z-60);
    transition: width 0.1s ease;
}

/* Enlace para saltar al contenido (accesibilidad) */
.enlace-salto {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: var(--fondo-profundo);
    color: var(--texto-principal);
    padding: var(--espaciado-2) var(--espaciado-4);
    border-radius: var(--radio-sm);
    z-index: var(--z-100);
}

.enlace-salto:focus {
    left: var(--espaciado-4);
    top: var(--espaciado-4);
    width: auto;
    height: auto;
}

/* Overlay para menú móvil */
.overlay-menu {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transicion-normal);
    z-index: var(--z-70);
}

.overlay-menu.activo {
    opacity: 1;
    pointer-events: auto;
}

/* Contenedor principal */
.contenedor {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Secciones generales */
.seccion {
    padding: var(--espaciado-16) 0;
    position: relative;
    overflow: hidden;
}

.seccion-titulo {
    text-align: center;
    margin-bottom: var(--espaciado-12);
}

.seccion-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--espaciado-2);
    padding: var(--espaciado-2) var(--espaciado-4);
    border-radius: var(--radio-full);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.18);
    color: var(--texto-secundario);
    font-size: var(--texto-sm);
    margin-bottom: var(--espaciado-3);
}

.seccion-titulo h2 {
    font-size: var(--texto-4xl);
    margin-bottom: var(--espaciado-3);
}

.seccion-titulo p {
    color: var(--texto-secundario);
    max-width: 700px;
    margin: 0 auto;
    font-size: var(--texto-lg);
}

/* Animaciones reveal (se activan con JS) */
.revelar {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.revelar.visible {
    opacity: 1;
    transform: translateY(0);
}

.retraso-1 { transition-delay: 0.1s; }
.retraso-2 { transition-delay: 0.2s; }
.retraso-3 { transition-delay: 0.3s; }
.retraso-4 { transition-delay: 0.4s; }
.retraso-5 { transition-delay: 0.5s; }
.retraso-6 { transition-delay: 0.6s; }

/* Efecto glassmorphism */
.vidrio {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--borde);
}

/* Utilidades de espaciado */
.mt-1 { margin-top: var(--espaciado-1); }
.mt-2 { margin-top: var(--espaciado-2); }
.mt-3 { margin-top: var(--espaciado-3); }
.mt-4 { margin-top: var(--espaciado-4); }
.mt-5 { margin-top: var(--espaciado-5); }
.mt-6 { margin-top: var(--espaciado-6); }

.mb-1 { margin-bottom: var(--espaciado-1); }
.mb-2 { margin-bottom: var(--espaciado-2); }
.mb-3 { margin-bottom: var(--espaciado-3); }
.mb-4 { margin-bottom: var(--espaciado-4); }
.mb-5 { margin-bottom: var(--espaciado-5); }
.mb-6 { margin-bottom: var(--espaciado-6); }

.p-1 { padding: var(--espaciado-1); }
.p-2 { padding: var(--espaciado-2); }
.p-3 { padding: var(--espaciado-3); }
.p-4 { padding: var(--espaciado-4); }
.p-5 { padding: var(--espaciado-5); }
.p-6 { padding: var(--espaciado-6); }

/* Utilidades de display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Utilidades de flex */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--espaciado-1); }
.gap-2 { gap: var(--espaciado-2); }
.gap-3 { gap: var(--espaciado-3); }
.gap-4 { gap: var(--espaciado-4); }

/* Utilidades de grid */
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Utilidades de ancho */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }

/* Utilidades de alto */
.h-full { height: 100%; }
.h-auto { height: auto; }

/* Utilidades de borde */
.rounded-sm { border-radius: var(--radio-sm); }
.rounded-md { border-radius: var(--radio-md); }
.rounded-lg { border-radius: var(--radio-lg); }
.rounded-xl { border-radius: var(--radio-xl); }
.rounded-full { border-radius: var(--radio-full); }

/* Utilidades de sombra */
.shadow-sm { box-shadow: var(--sombra-sm); }
.shadow-md { box-shadow: var(--sombra-md); }
.shadow-lg { box-shadow: var(--sombra-lg); }
.shadow-primary { box-shadow: var(--sombra-primaria); }

/* Utilidades de opacidad */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Utilidades de posición */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }

/* Z-index */
.z-0 { z-index: var(--z-0); }
.z-10 { z-index: var(--z-10); }
.z-20 { z-index: var(--z-20); }
.z-30 { z-index: var(--z-30); }
.z-40 { z-index: var(--z-40); }
.z-50 { z-index: var(--z-50); }
.z-100 { z-index: var(--z-100); }

/* Texto truncado */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Línea de tiempo para efectos */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(135deg, var(--primario), var(--cian));
}

/* ===== PÁGINAS LEGALES ===== */
@import url('paginas/legal.css');
@import url('paginas/legal.css');
