.tutorial-article {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
}

.article-title {
    font-size: 2.5rem;
    color: #3776ab; /* Azul Python */
    margin-bottom: 1rem;
    font-weight: 300;
}

.article-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.content-section h3 {
    color: #3776ab; /* Azul Python */
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
}

.content-section h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem 0;
}

.content-section h5 {
    color: #3776ab;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem 0;
}

.content-section h6 {
    color: #5a7a9a;
    font-size: 1rem;
    margin: 0.8rem 0 0.3rem 0;
}

.content-section p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #555;
}

/* Grid de características */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3776ab;
    text-align: center;
}

.feature h3 {
    margin-top: 0;
    color: #3776ab;
}

/* Grid de librerías */
.libraries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.library {
    background: #f0f7ff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #3776ab;
    text-align: center;
}

.library h4 {
    margin-top: 0;
    color: #3776ab;
}

.library code {
    background: #3776ab;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Estilos para pasos */
.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #3776ab;
}

.step h3, .step h5 {
    color: #2c3e50;
    margin-top: 0;
}

/* Notas importantes */
.note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    color: #856404;
}

.note strong {
    color: #856404;
}

/* Estilos para listas */
.content-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Estilos para código */
.code-block {
    display: inline-block;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

kbd {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    font-family: monospace;
    color: #495057;
}

.code-example {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-example h4, .code-example h5, .code-example h6 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.code-example pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

.code-example code {
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    line-height: 1.5;
}

/* Estilo para salida de código */
.code-example.output {
    background: #2c3e50;
    color: #ecf0f1;
}

.code-example.output code {
    color: #ecf0f1;
}

/* Botón de copiar */
.copy-button {
    background: #3776ab;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: background-color 0.3s;
}

.copy-button:hover {
    background: #2c5d8a;
}

/* Estilos para sección de problemas */
.troubleshooting {
    background: #fffaf0;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #e67e22;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.problem {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.problem h3 {
    color: #e67e22;
    margin-top: 0;
}

/* Próximos pasos */
.next-steps {
    background: #f0f7ff;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3776ab;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.next-step {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.next-step h3 {
    color: #3776ab;
    margin-top: 0;
}

/* Estilos para caja extensible */
.expandable-box {
    margin-top: 1rem;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    overflow: hidden;
}

.expand-button {
    width: 100%;
    background: #3776ab;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.expand-button:hover {
    background: #2c5d8a;
}

.arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.expandable-content.expanded {
    max-height: 2000px; /* Valor suficientemente alto */
}

.expandable-content-inner {
    padding: 1.5rem;
}

/* Cuando la caja está expandida */
.expandable-box.expanded .arrow {
    transform: rotate(180deg);
}

.expandable-box.expanded .expand-button {
    background: #2c5d8a;
}

/* Enlaces */
.content-section a {
    color: #3776ab;
    text-decoration: none;
    font-weight: 500;
}

.content-section a:hover {
    text-decoration: underline;
    color: #2c5d8a;
}

/* Responsive */
@media (max-width: 768px) {
    .tutorial-article {
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .problems-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .libraries-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .code-example {
        padding: 1rem;
    }
    
    .step {
        padding: 1rem;
    }
    
    .expand-button {
        padding: 0.8rem 1rem;
    }
    
    .expandable-content-inner {
        padding: 1rem;
    }
    
    .feature, .library, .next-step {
        padding: 1rem;
    }
}