/*
Theme Name: Illan Theme
Theme URI: https://illan.me
Author: IllanWeb Team
Description: Tema principal del ecosistema.
Version: 3.2.3
*/


/* --- 1. Variables y Reset --- */
:root {
    --color-bg: #FAFAF9;       
    --color-surface: #FFFFFF;  
    --color-text: #2D2D2D;     
    --color-text-light: #666666; 
    --color-accent: #00AEEF;   
    --color-border: #E5E5E5;   
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Eliminada --header-height y --max-width global */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Ocultamos overflow horizontal global */
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-accent); }
img { max-width: 100%; height: auto; display: block; }

/* --- 2. Layout Canvas (Lienzo Infinito) --- */
.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    /* Cero restricciones. Los plugins deciden. */
    flex: 1;
    width: 100%;
    margin: 0;
    padding: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* --- 3. UI Global: Floating Action Button (FAB) --- */
.illan-fab-menu {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--color-text);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 9999;
    border: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease;
}

.illan-fab-menu:hover {
    transform: scale(1.1);
    background-color: var(--color-accent);
}

.illan-fab-menu svg {
    width: 28px;
    height: 28px;
    stroke-width: 2px;
}

/* --- 4. Utilidades SPA --- */
#spa-loader-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 2px;
    background: transparent; z-index: 100000; opacity: 0; visibility: hidden; transition: opacity 0.2s;
}
body.spa-loading #spa-loader-nav { opacity: 1; visibility: visible; }
.spa-progress-bar {
    width: 100%; height: 100%; background-color: var(--color-accent);
    transform: translateX(-100%); animation: spa-progress 1s infinite linear;
}
@keyframes spa-progress { 0% { transform: translateX(-100%); } 50% { transform: translateX(0%); } 100% { transform: translateX(100%); } }
#spa-loader-initial { transition: opacity 0.5s ease, visibility 0s 0.5s; }
#spa-loader-initial.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }


/* --- 5. Scrollbar Premium (Efecto Flotante) --- */

/* Firefox */
html, body, #illan-sidebar-container, .user-menu-dropdown {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* WebKit (Chrome, Edge, Safari) - Selectores Globales */
::-webkit-scrollbar {
    width: 8px;              /* Ancho suficiente para clic */
    height: 8px;             /* Alto horizontal */
    background-color: transparent;
}

::-webkit-scrollbar-track {
    background-color: transparent; /* Fondo totalmente transparente */
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);   /* Gris suave semitransparente */
    border-radius: 20px;                    /* Píldora perfecta */
    border: 2px solid transparent;          /* Borde transparente */
    background-clip: content-box;           /* TRUCO: La 'pintura' se corta en el contenido, dejando el borde transparente como margen */
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);   /* Se oscurece al interactuar */
}

/* Scrollbar específico para Sidebar en modo oscuro (God Mode) si existe */
.zone-god-mode ::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}
.zone-god-mode ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}