/* --- ESTILOS GLOBALES --- */
:root {
    --primary-color: #2980b9; /* Azul principal */
    --secondary-color: #2c3e50; /* Color Barra Lateral */
    --text-color: #333;
    --bg-light: #f4f6f8;
    --white: #ffffff;
    --sidebar-width: 300px;
    --menu-current-bg: #e3e3e3; /* Fondo del elemento seleccionado */
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- ESTRUCTURA FIJA (Barra izquierda quieta) --- */
.wy-nav-side {
    background-color: var(--secondary-color);
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto; /* Scroll si la lista es muy larga */
    z-index: 200;
}

.wy-nav-content-wrap {
    margin-left: var(--sidebar-width);
    background-color: var(--bg-light);
    min-height: 100vh;
}

/* --- BUSCADOR (Parte superior izquierda) --- */
.wy-side-nav-search {
    background-color: rgba(0,0,0,0.2);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.wy-side-nav-search a {
    color: #fff;
    font-weight: bold;
    font-size: 1.2em;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}

.wy-form input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: none;
}

/* --- MENÚ LATERAL (SOLUCIÓN AL SOLAPAMIENTO) --- */
.wy-menu-vertical {
    width: 100%;
}

/* Títulos de sección (INTRODUCCION, UBUNTU, WINDOWS...) */
.wy-menu-vertical p.caption {
    color: #888;
    text-transform: uppercase;
    font-size: 0.85em;
    font-weight: bold;
    
    /* AQUÍ ESTÁ LA CLAVE DE LA SEPARACIÓN */
    margin-top: 25px;    /* Empuja hacia abajo para separarse del anterior */
    margin-bottom: 10px; /* Empuja el contenido de abajo */
    padding-left: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: block; /* Asegura que ocupe su propia línea */
}

/* Enlaces normales */
.wy-menu-vertical li a {
    color: #d9d9d9;
    padding: 10px 20px;
    display: block;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.wy-menu-vertical li a:hover {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: var(--primary-color);
}

/* --- ELEMENTO SELECCIONADO (Sprint actual) --- */
.wy-menu-vertical li.current {
    background-color: var(--menu-current-bg);
}

/* El enlace principal del seleccionado */
.wy-menu-vertical li.current > a {
    color: #333 !important; /* Texto oscuro para contrastar con fondo claro */
    font-weight: bold;
    border-left: 3px solid var(--primary-color);
    background-color: transparent;
    padding: 12px 20px;
}

/* ARREGLO HOVER: Cuando pasas el ratón sobre el seleccionado */
.wy-menu-vertical li.current > a:hover {
    background-color: rgba(0,0,0,0.05); /* Gris muy suave */
    color: var(--primary-color) !important; /* Texto AZUL, no blanco */
}

/* --- SUBMENÚ (Los apartados dentro del Sprint) --- */
.wy-menu-vertical li.current ul {
    display: block;
    padding: 10px 0; /* Separación vertical interna */
    background-color: #f0f0f0; /* Fondo ligeramente diferente para distinguir */
}

.wy-menu-vertical li.toctree-l2 a, 
.wy-menu-vertical li.toctree-l3 a {
    color: #666;
    padding: 6px 20px 6px 40px; /* Más indentación a la izquierda */
    font-size: 0.9em;
}

.wy-menu-vertical li.toctree-l2 a:hover,
.wy-menu-vertical li.toctree-l3 a:hover {
    color: var(--primary-color);
    background-color: transparent;
}

/* --- CONTENIDO PRINCIPAL --- */
.wy-nav-content {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.rst-content {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Títulos H1, H2... */
h1 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
    margin-top: 0;
}

h2, h3, h4 {
    color: var(--secondary-color);
    margin-top: 1.5em;
    font-weight: 600;
}

/* Imágenes */
.rst-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    margin: 20px 0;
    border: 1px solid #eee;
}

/* --- ESTILOS INDEX (PORTADA) --- */
.hero-section {
    text-align: center;
    padding: 50px 0;
}

.hero-title {
    font-size: 2.5em;
    color: var(--secondary-color);
    border: none !important;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.card {
    background: white;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.card h3 { color: var(--primary-color); margin-top: 0; }
.card p { color: #666; font-size: 0.95em; }

.btn-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: white !important;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
}

.contact-section {
    margin-top: 50px;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 4px solid var(--primary-color);
}

.footer-custom {
    text-align: center;
    margin-top: 50px;
    color: #999;
    font-size: 0.85em;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Responsivo */
@media (max-width: 768px) {
    .wy-nav-side { position: relative; width: 100%; height: auto; }
    .wy-nav-content-wrap { margin-left: 0; }
}
