/* --- Variables de Color y Estilo --- */
:root {
    --primary-color: #2c3e50;    /* Azul medianoche */
    --secondary-color: #3498db;  /* Azul brillante */
    --accent-color: #e67e22;     /* Naranja para botones */
    --bg-color: #f4f7f6;         /* Gris muy claro */
    --text-color: #333;
    --white: #ffffff;
    --border-color: #ddd;
}

/* --- Reseteo Básico --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* --- Header --- */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* --- Navegación --- */
.main-nav {
    background: var(--white);
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-group strong {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.nav-group a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-group a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- Contenedor Principal --- */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#stack h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
    margin-bottom: 1.5rem;
}

#stack p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* --- Tabla Responsiva --- */
.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.tools-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tools-table th, .tools-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.tools-table th {
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: bold;
}

.tools-table tr:hover {
    background-color: #f1f7fd;
}

.separator {
    background-color: #e9ecef;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
}

/* --- Sección de Teoría y Conceptos --- */
.theory-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color); /* Separación sutil de la tabla */
}

.concept-card {
    background-color: #eef2f7; /* Azul muy tenue para diferenciar del fondo */
    border-left: 6px solid var(--secondary-color); /* Acento lateral */
    padding: 2rem;
    border-radius: 0 12px 12px 0; /* Redondeado solo en la derecha */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto sutil al pasar el mouse */
.concept-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.concept-card h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    margin-top: 0;
    display: flex;
    align-items: center;
}

.concept-card p {
    color: #2c3e50;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Elimina el margen inferior del último párrafo */
.concept-card p:last-child {
    margin-bottom: 0;
}

/* Resalte de palabras clave dentro del texto */
.concept-card strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* --- Botones en Tabla --- */
.btn-sm {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.btn-sm:hover {
    background-color: var(--primary-color);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    background: var(--primary-color);
    color: var(--white);
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
}