/* ================================
   XHELOS 2: ORGANIC WARFARE
   Sistema de Conquista Galáctica
   Estilos Globales v2.14
   ================================ */

/* Import Local Fonts - optimized for performance */
@import url('../../fonts/fonts.css');

/* #region ===== VARIABLES Y RESET ===== */
:root {
    /* === TYPOGRAPHY === */
    --font-heading: "Exo 2", "Segoe UI", sans-serif;
    --font-body: 'Inter', Verdana, Geneva, sans-serif;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    
    /* Font Sizes */
    --fs-h1: 3rem;
    --fs-h2: 1.8rem;
    --fs-h3: 1.3rem;
    --fs-h4: 1.1rem;
    --fs-h5: 0.95rem;
    --fs-body: 1rem;
    --fs-small: 0.80rem;
    --fs-xs: 0.75rem;
    
    /* Colores Base */
    --bg-primary: #0a0e1a;
    --bg-secondary: #121825;
    --bg-tertiary: #1a2332;
    --text-primary: #e0e6ed;
    --text-secondary: #a0a9b8;
    --text-tertiary: #0a0e1a;;
    
    /* Colores de Acento por Sector */
    --accent-bio: #4ade80;
    --accent-crystal: #60a5fa;
    --accent-tech: #f59e0b;
    --accent-psi: #a78bfa;
    --accent-chem: #ec4899;
    --accent-nucleo: #fbbf24;

    /* Colores Pasteles Oscuros para Fondos */
    --pastel-bio: #1f3d28;
    --pastel-crystal: #1f2d3d;
    --pastel-tech: #3d2f1f;
    --pastel-psi: #3d1b40;
    --pastel-chem: #3d1f2f;
    --pastel-nucleo: #3d331f;
    
    /* UI */
    --border: #2a3441;
    --hover: #243042;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-Index Layers */
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 50;
    --z-overlay: 100;
    --z-modal: 200;
    --z-tooltip: 1000;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.2);
    --shadow-glow-bio: 0 5px 20px rgba(74, 222, 128, 0.3);
    --shadow-glow-crystal: 0 5px 20px rgba(96, 165, 250, 0.3);


    /* Heading Colors - Más sutiles */
    --heading-primary: #ffffff;      /* H1 - Blanco puro */
    --heading-secondary: #e2e8f0;    /* H2 - Gris muy claro */
    --heading-tertiary: #cbd5e1;     /* H3 - Gris claro */
    --heading-quaternary: #94a3b8;   /* H4 - Gris medio */
    --heading-quinary: #64748b;      /* H5 - Gris medio-oscuro */
    
    /* Accent for special cases only */
    --heading-accent: #4ade80;       /* Verde para H1 o elementos especiales */    
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: var(--fs-body);
    -webkit-font-smoothing: antialiased;
    /*-moz-osx-font-smoothing: grayscale;*/
}
/* #endregion */

/* #region ===== NAVEGACIÓN GLOBAL ===== */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(18, 24, 37, 0.95);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-overlay);
    backdrop-filter: blur(10px);
}

.nav-home {
    text-decoration: none;
    color: var(--accent-bio);
    font-weight: 600;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: opacity var(--transition-fast);
}

.nav-home:hover {
    opacity: 0.8;
}

.nav-title {
    color: var(--text-secondary);
    font-size: var(--fs-small);
    font-family: var(--font-body);
}

/* Quick Navigation Sidebar */
.quick-nav {
    position: fixed;
    right: var(--space-xl);
    top: 6rem;
    width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    z-index: var(--z-sticky);
}

.quick-nav h4 {
    color: var(--accent-bio);
    font-size: var(--fs-small);
    font-family: var(--font-heading);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-nav a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.5rem;
    font-size: var(--fs-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    margin-bottom: var(--space-xs);
}

.quick-nav a:hover {
    background: var(--hover);
    color: var(--accent-crystal);
    transform: translateX(4px);
}

.quick-nav .section-header {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
}

.quick-nav .sub-item {
    padding-left: 1.5rem;
    font-size: var(--fs-small);
    color: var(--text-secondary);
}

.quick-nav .sub-item:hover {
    color: var(--text-primary);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-tertiary);
    color: var(--accent-bio);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    opacity: 0;
    pointer-events: none;
    font-size: 1.5rem;
    z-index: var(--z-sticky);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-5px);
    border-color: var(--accent-bio);
    box-shadow: var(--shadow-glow-bio);
}
/* #endregion */

/* #region ===== CONTENEDORES ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem var(--space-xl) var(--space-xl);
}

.container.with-sidebar {
    margin-right: 240px;
    margin-top:6rem;
}
/* #endregion */

/* #region ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}



.subtitle3 {
  font-size: var(--fs-h4);
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: block;
}

h1 {
font-size: 3.5rem;
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--border);
  scroll-margin-top: 5rem;
  text-align: center;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-xl);
  color: var(--heading-accent);
}

h2 {
    font-size: var(--fs-h2);
    margin: 2.5rem 0 1rem;
    scroll-margin-top: 5rem;
    color: var(--heading-secondary);
    border-bottom: 4px solid rgba(74, 222, 128, 0.2);
    padding: 0.5rem 0;
}

h3 {
    font-size: var(--fs-h3);
    color: var(--heading-tertiary);
    margin: 2rem 0 1rem;
    scroll-margin-top: 5rem;
}

h4 {
    font-size: var(--fs-h4);
    color: var(--heading-quaternary);
    margin: 1.5rem 0 0.75rem;
}

h5 {
    font-size: var(--fs-h5);
    color: var(--heading-quaternary);
    margin: 1rem 0 0.5rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

em {
    color: var(--accent-psi);
    font-style: italic;
}

blockquote {
    border-left: 4px solid var(--accent-bio);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-xl) 0;
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}
/* #endregion */

/* #region ===== LISTAS ===== */
ul, ol {
    margin: var(--space-md) 0 var(--space-lg) var(--space-md);
    font-family: var(--font-body);
}

li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}
/* #endregion */

/* #region ===== TABLAS ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    overflow-x: auto;
    font-family: var(--font-body);
}

th {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    text-align: left;
    color: var(--accent-bio);
    font-weight: 600;
    white-space: nowrap;
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: var(--font-heading);
}

td {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    color: var(--text-primary);
}

tr {
    transition: background var(--transition-fast);
}

tr:hover {
    background: var(--hover);
}
/* #endregion */

/* #region ===== CÓDIGO ===== */
pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    overflow-x: auto;
    margin: var(--space-lg) 0;
    color: var(--accent-bio);
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    line-height: 1.5;
}

code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    color: var(--accent-tech);
    font-family: var(--font-mono);
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}
/* #endregion */

/* #region ===== COMPONENTES ESPECIALES ===== */
/* Info and Warning Boxes */
.info-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.info-box h4 {
    color: var(--accent-bio);
    margin-top: 0;
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--accent-tech);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-lg) 0;
}

.tutorial-section {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--accent-bio);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.tutorial-section h3 {
    color: var(--accent-bio);
    margin-top: 0;
}

/* Sector Badges */
.sector-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--fs-small);
    margin-right: var(--space-sm);
    font-family: var(--font-heading);
}

.sector-badge.biomasa { 
    background: rgba(74, 222, 128, 0.2); 
    color: var(--accent-bio); 
}

.sector-badge.cristal { 
    background: rgba(96, 165, 250, 0.2); 
    color: var(--accent-crystal); 
}

.sector-badge.tech { 
    background: rgba(245, 158, 11, 0.2); 
    color: var(--accent-tech); 
}

.sector-badge.psi { 
    background: rgba(167, 139, 250, 0.2); 
    color: var(--accent-psi); 
}

.sector-badge.quimico { 
    background: rgba(236, 72, 153, 0.2); 
    color: var(--accent-chem); 
}
/* #endregion */

/* #region ===== ANIMACIONES GLOBALES ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease;
}

.animate-fadeInDown {
    animation: fadeInDown 0.5s ease;
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}
/* #endregion */

/* #region ===== UTILIDADES ===== */
/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-small { font-size: var(--fs-small); }
.text-xs { font-size: var(--fs-xs); }
.text-large { font-size: 1.2rem; }
.text-bold { font-weight: 600; }
.text-uppercase { text-transform: uppercase; }

/* Margin Utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.my-0 { margin-top: 0; margin-bottom: 0; }
.my-1 { margin-top: var(--space-sm); margin-bottom: var(--space-sm); }
.my-2 { margin-top: var(--space-md); margin-bottom: var(--space-md); }
.my-3 { margin-top: var(--space-lg); margin-bottom: var(--space-lg); }
.my-4 { margin-top: var(--space-xl); margin-bottom: var(--space-xl); }

/* Padding Utilities */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }

/* Color Utilities */
.biomasa { color: var(--accent-bio); }
.cristal { color: var(--accent-crystal); }
.tech { color: var(--accent-tech); }
.psi { color: var(--accent-psi); }
.quimico { color: var(--accent-chem); }
.nucleo { color: var(--accent-nucleo); }

/* Display Utilities */
.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; }

/* Flex Utilities */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }
/* #endregion */




/* #region ===== RESPONSIVE GLOBAL ===== */
@media (max-width: 1200px) {
    .quick-nav {
        display: none;
    }
    
    .container.with-sidebar {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --fs-h1: 2rem;
        --fs-h2: 1.5rem;
        --fs-h3: 1.2rem;
        --fs-h4: 1rem;
        --fs-h5: 0.9rem;
        --fs-body: 0.95rem;
    }
    
    .nav-bar {
        padding: var(--space-sm) var(--space-md);
    }
    
    .nav-title {
        display: none;
    }
    
    .container {
        padding: 5rem var(--space-md) var(--space-md);
    }
    
    table { 
        font-size: var(--fs-small); 
    }
    
    th, td { 
        padding: 0.5rem; 
    }
    
    .back-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    :root {
        --space-xs: 0.125rem;
        --space-sm: 0.25rem;
        --space-md: 0.5rem;
        --space-lg: 0.75rem;
        --space-xl: 1rem;
        --fs-body: 0.9rem;
        --fs-small: 0.8rem;
    }
}

@media print {
    .nav-bar,
    .quick-nav,
    .back-to-top {
        display: none;
    }
    
    .container {
        margin: 0;
        padding: 0;
    }
    
    body {
        background: white;
        color: black;
    }
}
/* #endregion */
