/* -----------------------------------
   SISTEMA DE TEMAS DINÁMICOS - ECLIPCSS
   Colores Oficiales: Verde Limón, Gris Humo, Negro Profundo y Blanco
----------------------------------- */

:root {
    /* Transición global */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Tokens Oficiales de Eclipcss */
    --theme-bg: #050505; /* Negro Profundo */
    --theme-surface: rgba(255, 255, 255, 0.02);
    --theme-surface-hover: rgba(204, 255, 0, 0.04);
    --theme-border: rgba(115, 130, 118, 0.2); /* Gris Humo Translúcido */
    --theme-primary: #ccff00; /* Verde Limón */
    --theme-primary-dark: #a3cc00;
    --theme-accent: #738276; /* Gris Humo */
    --theme-text: #ffffff; /* Blanco */
    --theme-muted: #738276; /* Gris Humo */

    /* Escala de Espaciados (Spacing Tokens) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Escala de Bordes (Border Radii) */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Sombras de Neón (Neon Glow Shadow Tokens) */
    --glow-lime: 0 0 15px rgba(204, 255, 0, 0.35);
    --glow-lime-strong: 0 0 25px rgba(204, 255, 0, 0.6);
    --glow-white: 0 0 15px rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.8);
}

body {
    background: var(--theme-bg);
    color: var(--theme-text);
    font-family: 'Quicksand', sans-serif;
    margin: 0;
    transition: var(--transition);
}

/* -----------------------------------
   TEMA 1: CORPORATIVO MODERNO (SaaS / Tech)
----------------------------------- */
body.theme-corporate {
    --theme-bg: #090d16;
    --theme-surface: rgba(255, 255, 255, 0.04);
    --theme-surface-hover: rgba(255, 255, 255, 0.08);
    --theme-border: rgba(255, 255, 255, 0.1);
    --theme-primary: #2563eb;
    --theme-primary-dark: #1e40af;
    --theme-accent: #0ea5e9;
    --theme-text: #f8fafc;
    --theme-muted: #94a3b8;
}

/* -----------------------------------
   TEMA 2: FUTURISTA TECNOLÓGICO (Cyberpunk)
----------------------------------- */
body.theme-futuristic {
    --theme-bg: #030712;
    --theme-surface: rgba(6, 182, 212, 0.03);
    --theme-surface-hover: rgba(6, 182, 212, 0.08);
    --theme-border: rgba(6, 182, 212, 0.15);
    --theme-primary: #00f0ff;
    --theme-primary-dark: #0891b2;
    --theme-accent: #d946ef;
    --theme-text: #f3f4f6;
    --theme-muted: #6b7280;
}

/* -----------------------------------
   TEMA 3: CREATIVO ENERGÉTICO (Warm & Vibrant)
----------------------------------- */
body.theme-creative {
    --theme-bg: #0f0905;
    --theme-surface: rgba(249, 115, 22, 0.04);
    --theme-surface-hover: rgba(249, 115, 22, 0.08);
    --theme-border: rgba(249, 115, 22, 0.15);
    --theme-primary: #f97316;
    --theme-primary-dark: #ea580c;
    --theme-accent: #ec4899;
    --theme-text: #fafaf9;
    --theme-muted: #a8a29e;
}

/* -----------------------------------
   TEMA 4: MINIMALISTA BLANCO/NEGRO
----------------------------------- */
body.theme-minimal {
    --theme-bg: #050505;
    --theme-surface: rgba(255, 255, 255, 0.02);
    --theme-surface-hover: rgba(255, 255, 255, 0.06);
    --theme-border: rgba(255, 255, 255, 0.07);
    --theme-primary: #ffffff;
    --theme-primary-dark: #cccccc;
    --theme-accent: #888888;
    --theme-text: #ffffff;
    --theme-muted: #6b6b6b;
}

/* -----------------------------------
   TEMA 5: LUXURY PREMIUM (Gold & Slate)
----------------------------------- */
body.theme-luxury {
    --theme-bg: #070708;
    --theme-surface: rgba(212, 175, 55, 0.02);
    --theme-surface-hover: rgba(212, 175, 55, 0.06);
    --theme-border: rgba(212, 175, 55, 0.12);
    --theme-primary: #d4af37;
    --theme-primary-dark: #b68c1a;
    --theme-accent: #f5d76e;
    --theme-text: #faf9f6;
    --theme-muted: #8c8b88;
}

/* -----------------------------------
   APLICACIÓN GLOBAL DE VARIABLES
----------------------------------- */
body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
}

.card {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-border) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
    color: var(--theme-text) !important;
}

.card:hover {
    background: var(--theme-surface-hover) !important;
    border-color: var(--theme-primary) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.card--selected, .card.selected {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), var(--shadow-lg) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* inputs / selects / textareas */
input[type="text"],
input[type="range"],
select,
textarea {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--theme-text) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: var(--radius);
    padding: 12px 16px;
    outline: none;
    transition: var(--transition);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--theme-primary) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.btn-primary, .btn {
    background: var(--theme-primary);
    color: #000 !important;
    font-weight: 700;
    transition: var(--transition);
    border-radius: var(--radius);
    border: none;
}

body.theme-minimal .btn-primary,
body.theme-minimal .btn,
body.theme-corporate .btn-primary,
body.theme-corporate .btn {
    color: #ffffff !important;
}

.btn-primary:hover, .btn:hover {
    background: var(--theme-primary-dark);
    transform: scale(1.02);
}

/* Glassmorphism containers */
.glass {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--theme-border) !important;
}

.footer.glass {
    border-top: 1px solid var(--theme-border) !important;
    border-bottom: none !important;
}

/* Responsive grid */
.cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 0;
}

@media (min-width: 601px) {
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* -----------------------------------
   SOPORTE PARA MODO CLARO
----------------------------------- */
body.light-mode {
    --theme-bg: #3d4e3a; /* Verde Militar Base */
    --theme-surface: #ffffff; /* Blanco Puro */
    --theme-surface-hover: rgba(255, 255, 255, 0.95);
    --theme-border: rgba(255, 255, 255, 0.25);
    --theme-text: #ffffff; /* Blanco Puro */
    --theme-muted: rgba(255, 255, 255, 0.7);
    --theme-primary: #ccff00; /* Verde Limón */
    --theme-primary-dark: #a3cc00;
    --theme-accent: #ffffff;
}

body.light-mode .card {
    background: #ffffff !important; /* Blanco Puro */
    color: #1a2916 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(61, 78, 58, 0.2) !important;
}

body.light-mode .card:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22) !important;
}

body.light-mode .card h1,
body.light-mode .card h2,
body.light-mode .card h3,
body.light-mode .card h4,
body.light-mode .card p,
body.light-mode .card label,
body.light-mode .card span,
body.light-mode .card div,
body.light-mode .card td,
body.light-mode .card th {
    color: #1a2916 !important;
}

body.light-mode input[type="text"],
body.light-mode select,
body.light-mode textarea {
    background: #ffffff !important; /* Blanco Puro */
    color: #1a2916 !important;
    border-color: rgba(61, 78, 58, 0.4) !important;
}

body.light-mode .btn-primary, 
body.light-mode .btn {
    color: #050505 !important;
    background: #ccff00 !important;
}

body.light-mode .glass {
    background: rgba(61, 78, 58, 0.85) !important; /* Verde Militar Transparente */
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

/* Sidebar Hamburger Navigation Styles */
.sidebar-item {
    display: block;
    padding: 12px 16px;
    color: var(--theme-text) !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s, color 0.3s;
    border: 1px solid transparent;
}

.sidebar-item:hover {
    background: rgba(204, 255, 0, 0.06);
    color: #ccff00 !important;
    border-color: rgba(204, 255, 0, 0.15);
}

.sidebar-item.active {
    background: #ccff00 !important;
    color: #050505 !important;
    font-weight: bold;
}

body.light-mode .sidebar-item.active {
    background: #ffffff !important;
    color: #3d4e3a !important;
}

body.light-mode #sidebar-menu {
    background: #3d4e3a !important;
    border-right-color: rgba(255, 255, 255, 0.15) !important;
}

/* -----------------------------------
   LIBRERÍA DE COMPONENTES DEL DESIGN SYSTEM
----------------------------------- */

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: var(--radius-md) !important;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--theme-primary) !important;
    color: #050505 !important;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--theme-primary-dark) !important;
    box-shadow: var(--glow-lime);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--theme-border) !important;
    color: var(--theme-text) !important;
}

.btn-secondary:hover {
    background: rgba(204, 255, 0, 0.05) !important;
    border-color: var(--theme-primary) !important;
    box-shadow: var(--glow-lime);
    color: var(--theme-primary) !important;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent !important;
    border: 1.5px solid var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

.btn-outline:hover {
    background: rgba(204, 255, 0, 0.08) !important;
    box-shadow: var(--glow-lime);
    transform: translateY(-1px);
}

.btn-disabled {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: var(--theme-muted) !important;
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- RANGES / SLIDERS PERSONALIZADOS --- */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--theme-primary);
    cursor: pointer;
    box-shadow: var(--glow-lime);
    transition: transform 0.2s, background 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--glow-lime-strong);
}

/* --- BADGES / CHIPS --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 12px; /* Redondeados y elegantes */
    letter-spacing: 0.8px;
    transition: box-shadow 0.25s ease, transform 0.2s;
}

.badge:hover {
    transform: translateY(-1px);
}

/* Variante 1: Neón Verde Limón */
.badge-primary, .badge-neon {
    background: rgba(204, 255, 0, 0.1) !important;
    border: 1.5px solid #ccff00 !important;
    color: #ccff00 !important;
    box-shadow: 0 0 8px rgba(204, 255, 0, 0.25) !important;
}

/* Variante 2: Blanco Puro con destello Verde Limón */
.badge-secondary, .badge-white {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid #ffffff !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.35) !important; /* Destello verde limón */
}

/* --- AVATAR OFICIAL ECLIPCSS --- */
.brand-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ccff00; /* Círculo verde limón */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.3);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #ccff00;
}

.brand-avatar svg {
    width: 60%;
    height: 60%;
}

/* Forzar que el isotipo del logo sea monocromático blanco */
.brand-avatar svg path,
.brand-avatar svg circle,
.brand-avatar svg line,
.brand-avatar svg polygon {
    stroke: #ffffff !important;
    fill: none !important;
}

.brand-avatar svg polygon[fill],
.brand-avatar svg circle[fill="#738276"] {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* --- CARGADORES (LOADERS) --- */
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--theme-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: var(--glow-lime);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.loader-dots div {
    width: 8px;
    height: 8px;
    background: var(--theme-primary);
    border-radius: 50%;
    animation: pulseDots 1.2s infinite ease-in-out;
    box-shadow: var(--glow-lime);
}

.loader-dots div:nth-child(2) { animation-delay: 0.2s; }
.loader-dots div:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulseDots {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* --- CLASE DE UTILIDAD: BRAND PALABRA VOLTEADA VERDE LIMÓN --- */
.flipped-brand-word {
    display: inline-block;
    transform: rotate(180deg) scaleX(-1);
    color: #ccff00 !important;
    font-family: "Monoton", sans-serif !important;
    font-weight: normal !important; /* Monoton is styled natively */
    font-style: normal;
    font-size: inherit;
}

.navbar-center-controls {
    display: none !important;
}

@media (min-width: 991px) {
    .navbar-center-controls {
        display: flex !important;
    }
}

/* --- BOTONES DEL NAVBAR (SOLO PALABRAS) --- */
.navbar-btn {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important; /* Blanco por defecto en modo oscuro */
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.2s ease;
    outline: none;
    box-shadow: none !important;
}

.navbar-btn:hover {
    color: #ccff00 !important; /* Verde limón en hover para modo oscuro */
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Modo claro: texto negro cambiando a verde soldado */
body.light-mode .navbar-btn {
    color: #000000 !important; /* Negro por defecto */
}

body.light-mode .navbar-btn:hover {
    color: #3d4e3a !important; /* Verde soldado en hover */
    background: transparent !important;
}

/* --- ANIMACIONES Y ESTILOS PARA LOS PUNTOS INTERACTIVOS DE RUA --- */
@keyframes ruaDotPulse {
    0%, 100% {
        transform: scale3d(0.8, 0.8, 0.8) translate3d(0, 0, 0);
        opacity: 0.6;
        box-shadow: 0 0 6px #ccff00;
    }
    50% {
        transform: scale3d(1.3, 1.3, 1.3) translate3d(0, -4px, 15px);
        opacity: 1;
        box-shadow: 0 0 12px #ccff00;
    }
}

.rua-dot {
    animation: ruaDotPulse 1.8s infinite ease-in-out;
}

.rua-dot:nth-child(1) { animation-delay: 0.0s; }
.rua-dot:nth-child(2) { animation-delay: 0.2s; }
.rua-dot:nth-child(3) { animation-delay: 0.4s; }
.rua-dot:nth-child(4) { animation-delay: 0.6s; }
.rua-dot:nth-child(5) { animation-delay: 0.8s; }

/* En modo claro los puntos cambian a verde soldado por defecto */
body.light-mode .rua-dot {
    background: #3d4e3a !important;
    box-shadow: 0 0 6px rgba(61, 78, 58, 0.5) !important;
}

@keyframes ruaDotPulseLight {
    0%, 100% {
        transform: scale3d(0.8, 0.8, 0.8) translate3d(0, 0, 0);
        opacity: 0.6;
        box-shadow: 0 0 4px rgba(61, 78, 58, 0.4);
    }
    50% {
        transform: scale3d(1.3, 1.3, 1.3) translate3d(0, -4px, 15px);
        opacity: 1;
        box-shadow: 0 0 10px rgba(61, 78, 58, 0.8);
    }
}

body.light-mode .rua-dot {
    animation-name: ruaDotPulseLight;
}

/* --- ENFORCEMENT DE TIPOGRAFÍAS DE DISEÑO --- */
/* Textos y párrafos en Quicksand (Arenas Movedizas) */
p, li, td, th, .card p, .view p, .footer p {
    font-family: 'Quicksand', sans-serif !important;
}

/* Botones, Inputs, Formularios y Tooltips en Advent Pro con diferentes pesos */
button, 
input, 
select, 
textarea, 
.btn, 
.navbar-btn,
.tooltip-bubble, 
.tooltip, 
label, 
.glowing-input,
legend {
    font-family: 'Advent Pro', sans-serif !important;
    font-variation-settings: "wdth" 100 !important; /* Estándar o variable según elemento */
}

/* Pesos diferenciados para botones y títulos de inputs para legibilidad extrema */
button, .btn, .navbar-btn {
    font-weight: 700 !important;
}
label, legend {
    font-weight: 600 !important;
}
input, textarea, select {
    font-weight: 400 !important;
}
.tooltip-bubble {
    font-weight: 500 !important;
    font-size: 0.85rem !important;
}

/* --- ESTILOS COMPARTIDOS DE BOTONES DEL HERO DE LANDING --- */
.landing-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 24px auto 32px;
    gap: 16px;
    justify-content: center;
    box-sizing: border-box;
}

.landing-action-btn {
    border-radius: 8px !important;
    padding: 14px 24px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: none !important;
    box-shadow: none !important;
}

/* En Modo Oscuro (Predeterminado): estilo tipo Acceso Socios TSolutions (outline verde limón con brillo y fondo transparente) */
.landing-action-btn {
    background: rgba(204, 255, 0, 0.03) !important;
    color: #ccff00 !important;
    border: 1.5px dashed rgba(204, 255, 0, 0.4) !important;
}

.landing-action-btn:hover {
    background: rgba(204, 255, 0, 0.12) !important;
    border: 1.5px solid #ccff00 !important;
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.5) !important;
    transform: translateY(-2px) !important;
}

/* En Modo Claro: estilo tipo Comenzar Construcción en oscuro (fondo verde limón sólido con texto negro) */
body.light-mode .landing-action-btn {
    background: #ccff00 !important;
    color: #050505 !important;
    border: 1.5px solid #ccff00 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.light-mode .landing-action-btn:hover {
    background: #a3cc00 !important;
    border-color: #a3cc00 !important;
    color: #050505 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* Responsive: alineación vertical en móviles y horizontal en tablets/escritorio/TVs */
@media (min-width: 768px) {
    .landing-buttons-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        max-width: 900px;
    }
    .landing-action-btn {
        flex: 1;
        min-width: 200px;
        white-space: nowrap;
    }
}

/* --- ESTILOS DE REDES SOCIALES EN FOOTER --- */
.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #ccff00 !important;
    color: #050505 !important;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.social-icon-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 18px #ccff00, 0 0 30px #ccff00 !important;
    background: #ccff00 !important;
    color: #050505 !important;
}

/* Modo claro: círculos en verde soldado reactivo */
body.light-mode .social-icon-link {
    background: #3d4e3a !important;
    color: #ffffff !important;
}

body.light-mode .social-icon-link:hover {
    box-shadow: 0 0 18px rgba(61, 78, 58, 0.85), 0 0 30px rgba(61, 78, 58, 0.5) !important;
    background: #3d4e3a !important;
    color: #ffffff !important;
}
