.tutorial-article {
    max-width: 1000px;
    margin: 0 auto;
    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: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 300;
}

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

.exercise-info {
    margin-top: 1.5rem;
}

.difficulty {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.badge.intermediate {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge.time-estimate {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Objetivos de aprendizaje */
.learning-objectives {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.objective {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

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

.objective i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.objective h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.objective p {
    color: #7f8c8d;
    line-height: 1.5;
}

/* Requisitos previos */
.prerequisites {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.prerequisite-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #2ecc71;
}

.prerequisite-item i {
    color: #27ae60;
}

.prerequisite-item span {
    color: #2c3e50;
    font-weight: 500;
}

/* Estado del archivo */
.estado-archivo {
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin: 1.5rem 0;
}

.archivo-info {
    line-height: 1.6;
}

.badge.existe {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge.no-existe {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contenido-archivo {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    border: 1px solid #34495e;
    max-height: 300px;
    overflow-y: auto;
}

/* Resultado de acción */
.resultado-accion {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.mensaje-resultado {
    color: #856404;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Demo interactivo */
.live-example {
    padding: 2rem;
    border-radius: 8px;
    border: 2px dashed #3498db;
    margin: 2rem 0;
}

.form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-container h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.botones-accion {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
}

.btn-crear {
    background: #27ae60;
}

.btn-crear:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-leer {
    background: #3498db;
}

.btn-leer:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-eliminar {
    background: #e74c3c;
}

.btn-eliminar:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea {
    min-height: 100px;
}

.form-group textarea:focus,
.form-group input:focus {
    border-color: #3498db;
    outline: none;
}

.submit-btn {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Explicación del código */
.code-explanation {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.code-section {
    border-radius: 8px;
    overflow: hidden;
}

.code-section h3 {
    background: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.1rem;
}

.code-example {
    padding: 1.5rem;
    margin: 0;
    position: relative;
}

.code-example pre {
    margin: 0;
    white-space: pre-wrap;
}

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

.explanation {
    padding: 1rem 1.5rem;
    border-top: 1px solid #3498db;
}

.explanation p {
    margin: 0.5rem 0;
    color: #2c3e50;
}

/* Estructura de base de datos */
.database-structure {
    display: grid;
    gap: 2rem;
    margin-top: 1.5rem;
}

.table-schema {
    padding: 1.5rem;
    border-radius: 8px;
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.schema-table th,
.schema-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.schema-table th {
    background: #2c3e50;
    color: white;
    font-weight: 600;
}

.schema-table tr:hover {
}

.sql-code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
}

.sql-code h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.sql-code pre {
    margin: 0;
    white-space: pre-wrap;
}

.sql-code code {
    font-family: 'Courier New', monospace;
    color: #ecf0f1;
}

/* Ejercicios prácticos */
.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.step {
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.step h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.step p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.exercise-hint {
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #2ecc71;
}

.exercise-hint h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.exercise-hint ul {
    color: #7f8c8d;
    padding-left: 1.5rem;
}

.exercise-hint li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Flujo de trabajo */
.workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.workflow-step {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 8px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #3498db;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.workflow-step h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.workflow-step p {
    color: #7f8c8d;
    line-height: 1.5;
}

/* Criterios de evaluación */
.evaluation-criteria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.criterion {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.criterion h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.criterion ul {
    color: #7f8c8d;
    padding-left: 1.5rem;
}

.criterion li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

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

.resource-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

.resource-link:hover {
    transform: translateX(5px);
    text-decoration: none;
    color: #2c3e50;
}

.resource-link i {
    font-size: 1.5rem;
    color: #3498db;
}

.resource-link span {
    font-weight: 500;
}

/* Resaltado de sintaxis */
.php-keyword {
    color: #0077cc;
    font-weight: bold;
}

.php-string {
    color: #dd1144;
}

.php-comment {
    color: #999988;
    font-style: italic;
}

.php-variable {
    color: #333333;
}

.php-number {
    color: #009999;
}

.php-html {
    color: #000080;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}
