/* Color Palette Refined to Brand Yellow & High-Tech Matte Shades */
:root {
    --bg-main: #09090b;
    --bg-surface: #101013;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --border-base: #222226;
    
    /* Enkantador Identity Colors */
    --brand-purple: #8b5cf6;
    --brand-yellow: #facc15;
    --brand-white-purple: #f3f0ff;
    
    /* Commando Division Signature Colors */
    --color-dev: #00d2ff;
    --color-data: #a855f7;
    --color-cloud: #facc15;
}

/* Global Layout Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Elite Glassmorphism Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-base);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo-img {
    display: block;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.main-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-yellow);
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.sub-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--brand-white-purple);
    letter-spacing: 1.8px;
}

/* Nav Controls Menu Layout */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 0.2rem 0;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--brand-yellow);
    transition: width 0.25s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-btn {
    border: 1px solid var(--brand-purple);
    background-color: rgba(139, 92, 246, 0.03);
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
    background-color: var(--brand-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.45);
    transform: translateY(-1px);
}

/* Mobile Toggle Layout Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* Hero Presentation Section */
.hero {
    padding: 12rem 2rem 7rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top, rgba(139, 92, 246, 0.12) 0%, transparent 55%);
}

.hero-container {
    max-width: 950px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.8rem;
    letter-spacing: -1.5px;
}

.hero-title span {
    color: var(--brand-purple);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.btn {
    padding: 0.85rem 2.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background-color: var(--brand-purple);
    color: var(--text-primary);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid var(--border-base);
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.01);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

/* High-Definition Visual Orchestration Terminal */
.terminal-window {
    background-color: #070709;
    border: 1px solid var(--border-base);
    border-radius: 8px;
    text-align: left;
    max-width: 680px;
    margin: 0 auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.7);
}

.terminal-header {
    background-color: #101013;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid var(--border-base);
    display: flex;
    align-items: center;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.close { background-color: #ef4444; }
.minimize { background-color: #f59e0b; }
.expand { background-color: #10b981; }

.terminal-title {
    color: var(--text-secondary);
    margin-left: 1rem;
    font-size: 0.75rem;
}

.terminal-body {
    padding: 1.8rem;
}

.terminal-line {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--brand-yellow);
    margin-right: 0.5rem;
}

.terminal-response {
    color: var(--text-secondary);
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
}

.terminal-response.success { color: #10b981; }
.terminal-response.core { color: var(--brand-purple); }
.terminal-response.status-live { color: #3b82f6; font-weight: 500; }
/* Concept Core Segment */
.concept-section {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-base);
    border-bottom: 1px solid var(--border-base);
    padding: 7rem 2rem;
}

.concept-container {
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
}

.section-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--brand-yellow);
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
}

.concept-section h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: -0.8px;
    line-height: 1.3;
}

.concept-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
    text-align: justify;
    font-weight: 300;
}

/* Grid Layout Arrays for Commando Cards */
.commandos-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    letter-spacing: -1px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.grid-commandos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 2.5rem;
}

.commando-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-base);
    border-radius: 12px;
    padding: 3rem 2rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.commando-badge-img {
    width: 160px;
    height: 160px;
    margin-bottom: 1.8rem;
}

.commando-badge-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.commando-card h3 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.commando-sub {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.commando-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

.border-dev h3 { color: var(--color-dev); }
.border-data h3 { color: var(--color-data); }
.border-cloud h3 { color: var(--color-cloud); }

.commando-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.border-dev:hover { border-color: rgba(0, 210, 255, 0.35); }
.border-data:hover { border-color: rgba(168, 85, 247, 0.35); }
.border-cloud:hover { border-color: rgba(250, 204, 21, 0.35); }

/* The Technical Edge Split Layout Section */
.metrics-split-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2.5rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.table-wrapper {
    flex: 1.2;
    min-width: 450px;
    border: 1px solid var(--border-base);
    border-radius: 8px;
    background-color: var(--bg-surface);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.compare-table th, .compare-table td {
    padding: 1.4rem 1.6rem;
    border-bottom: 1px solid var(--border-base);
}

.compare-table th {
    background-color: #0e0e11;
    font-weight: 600;
}

.highlight-th {
    color: var(--brand-yellow);
    border-bottom: 2px solid var(--brand-yellow) !important;
}

.highlight-td {
    color: var(--text-primary);
    font-weight: 500;
    background-color: rgba(250, 204, 21, 0.01);
}

/* Advanced AI Dashboard Graphic Panel Style */
.ai-panel {
    flex: 0.8;
    min-width: 340px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-base);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ai-panel-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-base);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 10px #ef4444;
    animation: beacon 1.8s infinite ease-in-out;
}

/* Gauge UI */
.gauge-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.radial-gauge {
    position: relative;
    width: 70px;
    height: 70px;
}

.circular-chart {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #1a1a22;
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
}

.purple-glow {
    stroke: var(--brand-purple);
}

.radial-gauge .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
}

.gauge-label h4 {
    font-size: 1rem;
    font-weight: 600;
}

.gauge-label p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Bar Clusters UI */
.bar-cluster {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.2rem;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bar-track {
    width: 100%;
    height: 5px;
    background-color: #1a1a22;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
}

.fill-purple { background-color: var(--brand-purple); box-shadow: 0 0 10px rgba(139, 92, 246, 0.6); }
.fill-cyan { background-color: var(--color-dev); box-shadow: 0 0 10px rgba(0, 210, 255, 0.6); }
.fill-yellow { background-color: var(--brand-yellow); box-shadow: 0 0 10px rgba(250, 204, 21, 0.6); }

/* Text Statement */
.ai-statement {
    background-color: rgba(255, 255, 255, 0.01);
    border-left: 2.5px solid var(--brand-yellow);
    padding: 1rem;
    border-radius: 0 6px 6px 0;
}

.ai-statement p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
}

/* Animations Layout */
@keyframes beacon {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 14px #ef4444; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* Corporate Footers */
.footer {
    border-top: 1px solid var(--border-base);
    padding: 4rem 2rem;
    background-color: #060608;
    text-align: center;
}

.footer-branding {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.footer-logo {
    max-width: 260px;
    height: auto;
    object-fit: contain;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-text strong {
    color: var(--text-primary);
}

.school-tag {
    font-size: 0.75rem;
    color: #4b4b54;
    margin-top: 0.8rem;
    letter-spacing: 0.5px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .hero-title { font-size: 2.8rem; }
    .table-wrapper { min-width: 100%; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #09090b;
        border-bottom: 1px solid var(--border-base);
        flex-direction: column;
        gap: 1.5rem;
        padding: 2.5rem 2rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .nav-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-btn { width: 100%; text-align: center; }
    .hero-title { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; gap: 1rem; }
    .btn { width: 100%; text-align: center; }
    
    .concept-section, .commandos-section, #metrics {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}



/* Contenedor principal alineado al tema */
.metrics-main-container {
    width: 100%;
    max-width: 1200px; /* O el ancho máximo que use tu sitio (ej. 1140px o 1200px) */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Forzar que todos los elementos calculen bien su tamaño */
.metrics-main-container *, 
.metrics-main-container *::before, 
.metrics-main-container *::after {
    box-sizing: border-box;
}

/* Contenedor del Dashboard */
.ai-dashboard-container {
    width: 100%;
    margin-bottom: 2.5rem;
    background: #0d0d11; 
    border: 1px solid #1f1f2e;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ai-dashboard-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #8a8a9e;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #1f1f2e;
    padding-bottom: 0.75rem;
}

/* Grid Horizontal Adaptable */
.ai-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

/* Estilo de las tarjetas */
.ai-card {
    background: #14141f;
    border: 1px solid #26263b;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    min-width: 0; /* Evita que el texto rompa el flexbox/grid */
}

.ai-card:hover {
    transform: translateY(-3px);
    border-color: #6e45e2;
}

.ai-card.animate-card {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    justify-content: flex-start;
}

/* Tarjeta de Latencia */
.latency-box {
    text-align: center;
    margin-bottom: 0.75rem;
}
.latency-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #00f2fe; 
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}
.latency-label {
    font-size: 0.85rem;
    color: #a0a0b8;
}

/* Asegurar responsividad en la tabla original */
.table-wrapper {
    width: 100%;
    overflow-x: auto; /* Permite scroll horizontal solo si la pantalla es muy pequeña */
    margin-top: 1.5rem;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}





/* Selector de Idiomas Premium Mate */
.lang-selector {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border-base);
    border-radius: 6px;
    background-color: rgba(16, 16, 19, 0.6);
    transition: all 0.25s ease;
}

.lang-selector:hover {
    border-color: var(--brand-purple);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Contenedor Desplegable Oscuro */
.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100%);
    right: 0;
    background-color: #101013; /* Tu var(--bg-surface) mate */
    border: 1px solid var(--border-base);
    border-radius: 6px;
    min-width: 105px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    z-index: 1100;
    overflow: hidden;
    padding: 4px 0;
	
}

.lang-selector:hover .lang-dropdown {
    display: block;
}

/* Opciones tipo Botón Limpias */
.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background-color: rgba(139, 92, 246, 0.08); /* Fondo purpura sutil */
    color: var(--brand-yellow);
}