/* Estilos específicos para la página de Vistas XML */
.vista-article {
    max-width: 1100px;
    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.2rem;
    color: #e67e22;
    margin-bottom: 1rem;
    font-weight: 300;
}

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

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.navigation-buttons.bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #ecf0f1;
}

.nav-btn {
    background: #e67e22;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: #d35400;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

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

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

/* Overview de vistas */
.views-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.view-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e1e8ed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-card:hover {
    transform: translateY(-5px);
    border-color: #e67e22;
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.15);
}

.view-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e67e22;
}

.view-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.view-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.view-card p {
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.view-type {
    background: #e67e22;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Estilos para código */
.code-example {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.code-example.small {
    margin: 0.5rem 0;
}

.code-header {
    background: #2c3e50;
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.copy-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.3);
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

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

/* Grid para análisis */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.analysis-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e67e22;
}

.analysis-card h3 {
    color: #e67e22;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Análisis de métodos */
.methods-analysis {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.method-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.method-section h3 {
    color: #e67e22;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.method-explanation {
    margin-top: 1rem;
}

.method-explanation p {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

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

.widget-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    text-align: center;
    transition: all 0.3s ease;
}

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

.widget-card h3 {
    color: #e67e22;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.widget-preview {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-demo {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    background: white;
    pointer-events: none;
}

.widget-demo:focus {
    outline: none;
    border-color: #e67e22;
}

/* Flujo de integración */
.integration-flow {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e67e22;
}

.step-number {
    background: #e67e22;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #e67e22;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.step-content p {
    margin: 0;
    color: #555;
}

/* Demo de conexión */
.code-connection {
    margin-top: 2rem;
}

.connection-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.xml-side, .php-side {
    flex: 1;
    min-width: 250px;
}

.xml-side h4, .php-side h4 {
    text-align: center;
    color: #e67e22;
    margin-bottom: 1rem;
}

.connection-arrow {
    font-size: 2rem;
    color: #e67e22;
    font-weight: bold;
}

/* Mejores prácticas */
.best-practices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.practice-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.practice-card h3 {
    color: #e67e22;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Grid para problemas */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 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);
    border: 1px solid #e1e8ed;
}

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

/* Grid para mejoras */
.improvements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.improvement {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.improvement h3 {
    color: #27ae60;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Sección de troubleshooting */
.troubleshooting {
    background: #fef5e7;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #e67e22;
}

/* Resaltado de sintaxis XML */
.xml-tag { color: #e74c3c; font-weight: bold; }
.xml-attribute { color: #3498db; }
.xml-value { color: #e67e22; }
.xml-comment { color: #27ae60; font-style: italic; }

/* Responsive */
@media (max-width: 768px) {
    .vista-article {
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .views-overview,
    .analysis-grid,
    .widgets-grid,
    .best-practices,
    .problems-grid,
    .improvements-grid {
        grid-template-columns: 1fr;
    }
    
    .flow-step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .connection-demo {
        flex-direction: column;
    }
    
    .connection-arrow {
        transform: rotate(90deg);
    }
    
    .code-example pre {
        padding: 1rem;
    }
    
    .code-header {
        padding: 0.5rem;
    }
    
    .widgets-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}