/* Estilos espec�ficos para la p�gina de XML */
/* Tema verde para datos y estructuras */

.tutorial-article {
    max-width: 1200px;
    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: #27ae60;
    margin-bottom: 1rem;
    font-weight: 300;
}

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

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

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

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

.feature {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    background: #e8f6f3;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #27ae60;
    margin-bottom: 0.5rem;
}

/* Syntax Example */
.syntax-example {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .syntax-example {
        grid-template-columns: 1fr;
    }
}

.code-editor {
    background: #2d3436;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.editor-header {
    background: #1e272e;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.editor-dot.red { background: #ff5f57; }
.editor-dot.yellow { background: #ffbd2e; }
.editor-dot.green { background: #28ca42; }

.editor-title {
    color: #95a5a6;
    font-family: monospace;
    margin-left: 1rem;
}

.xml-code {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

.xml-code code {
    color: inherit;
}

.xml-tag {
    color: #55efc4;
}

.xml-attribute {
    color: #74b9ff;
}

.xml-value {
    color: #ffeaa7;
}

.syntax-explanation {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.syntax-explanation h3 {
    color: #2c3e50;
    margin-top: 0;
}

.syntax-explanation ul {
    padding-left: 1.5rem;
}

.syntax-explanation li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

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

.rule {
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.rule:hover {
    border-color: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.1);
}

.rule-number {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.rule h3 {
    color: #2c3e50;
    margin-top: 0.5rem;
}

.rule code {
    background: #e8f6f3;
    color: #27ae60;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Technologies Tabs */
.technologies-tabs {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #dfe6e9;
    overflow-x: auto;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: #e8f6f3;
    color: #27ae60;
}

.tab-button.active {
    background: #27ae60;
    color: white;
}

.tab-content {
    padding: 2rem;
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #27ae60;
    margin-top: 0;
}

.tab-content pre {
    background: #2d3436;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 1rem;
}

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

.example-card {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.15);
    border-color: #27ae60;
}

.example-button {
    width: 100%;
    background: none;
    border: none;
    padding: 2rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-button:hover {
}

.example-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.example-card h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #e8f6f3;
    color: #27ae60;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Interactive Editor */
.interactive-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .interactive-editor {
        grid-template-columns: 1fr;
    }
}

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

.xml-textarea {
    width: 100%;
    height: 300px;
    padding: 1rem;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.xml-textarea:focus {
    outline: none;
    border-color: #27ae60;
}

.action-button {
    padding: 0.8rem 1.5rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background 0.3s ease;
}

.action-button:hover {
    background: #219653;
}

.result-box {
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 150px;
    border: 2px dashed #dfe6e9;
}

.result-box.success {
    border-color: #27ae60;
    background: #e8f6f3;
}

.result-box.error {
    border-color: #e74c3c;
    background: #fdeaea;
}

.hidden {
    display: none;
}

#tree-view {
    font-family: monospace;
    white-space: pre;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #dfe6e9;
    max-height: 300px;
    overflow-y: auto;
}

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

.use-case {
    text-align: center;
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.use-case:hover {
    transform: translateY(-5px);
    border-color: #27ae60;
}

.case-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.use-case h3 {
    color: #27ae60;
    margin-bottom: 0.5rem;
}

/* Mensaje de redirecci�n */
.redirect-message {
    background: #e7f3ff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.redirect-message h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

.redirect-message a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.redirect-message a:hover {
    text-decoration: underline;
}
