/* Estilos principales para el sitio web del curso */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333;
    --link-color: #2980b9;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #c0392b;
}

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

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

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Encabezado */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

header p {
    text-align: center;
    font-style: italic;
    margin-bottom: 1rem;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.search-container input {
    padding: 0.5rem;
    width: 300px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.search-container button {
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    display: block;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--secondary-color);
    border-radius: 4px;
    text-decoration: none;
}

/* Migas de pan */
.breadcrumbs {
    background-color: var(--light-color);
    padding: 0.5rem 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Contenido principal */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

main h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

main h2 {
    color: var(--dark-color);
    margin: 2rem 0 1rem;
}

main h3 {
    color: var(--dark-color);
    margin: 1.5rem 0 0.75rem;
}

main p {
    margin-bottom: 1rem;
}

main ul, main ol {
    margin-bottom: 1rem;
    margin-left: 2rem;
}

main li {
    margin-bottom: 0.5rem;
}

/* Tarjetas para temas y ejemplos */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem;
    background-color: var(--light-color);
    text-align: right;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-color);
    text-decoration: none;
}

/* Guías de laboratorio */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.lab-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.lab-card h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.lab-card p {
    margin-bottom: 1.5rem;
}

.lab-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

/* Recursos */
.resource-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.resource-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-5px);
}

.resource-item h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Ejemplos de código */
pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

/* Demostraciones interactivas */
.interactive-demo {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.demo-controls {
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.input-group input {
    padding: 0.5rem;
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.checkbox-group {
    margin: 1rem 0;
}

.demo-btn {
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.demo-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.demo-output {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
}

.output-section {
    margin-bottom: 1.5rem;
}

.output-section h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.visualization-container {
    min-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Pie de página */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--light-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--light-color);
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .card-grid, .lab-grid, .resource-list {
        grid-template-columns: 1fr;
    }
    
    .search-container input {
        width: 200px;
    }
}

/* Estilos para resaltar código */
.language-python {
    color: #333;
}

.language-python .keyword {
    color: #0000ff;
}

.language-python .string {
    color: #a31515;
}

.language-python .comment {
    color: #008000;
}

.language-python .number {
    color: #098658;
}

/* Estilos para tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #dee2e6;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Estilos para alertas */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
