/* Estilos específicos para el tutorial de HTML */
/* Tema naranja para desarrollo web */

.tutorial-article {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

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

.article-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #ea580c);
    border-radius: 2px;
}

.article-title {
    font-size: 3rem;
    background: linear-gradient(90deg, #f97316, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.article-subtitle {
    font-size: 1.4rem;
    color: #57534e;
    font-weight: 300;
    margin-bottom: 2rem;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: #57534e;
    background: #ffedd5;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.1);
}

.stat i {
    color: #f97316;
    font-size: 1.2rem;
}

.content-section {
    margin-bottom: 4rem;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #fed7aa;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.1);
}

.content-section h2 {
    font-size: 2.2rem;
    color: #451a03;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #fed7aa;
    position: relative;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: #f97316;
}

/* Sección de Introducción */
.intro-section {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.html-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.demo-box {
    flex: 1;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.code-box {
    border: 2px solid #f97316;
    background: #1e293b;
}

.result-box {
    border: 2px solid #ea580c;
}

.demo-box h3 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.browser-preview {
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
}

.browser-bar {
    background: #e2e8f0;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.browser-url {
    flex: 1;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #64748b;
}

.browser-content {
    padding: 2rem;
    min-height: 150px;
}

.demo-arrow {
    font-size: 2.5rem;
    color: #f97316;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Estructura Básica */
.structure-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.structure-visual {
    background: #1e293b;
    border-radius: 10px;
    padding: 2rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.1rem;
    line-height: 1.8;
}

.html-tag {
    color: #f87171;
}

.doctype { color: #60a5fa; }
.html-open, .html-close { color: #34d399; }
.head-open, .head-close { color: #fbbf24; }
.body-open, .body-close { color: #8b5cf6; }
.title-open, .title-close { color: #f472b6; }
.h1-open, .h1-close { color: #22d3ee; }

.html-content {
    color: #e2e8f0;
}

.indent-1 { margin-left: 1rem; }
.indent-2 { margin-left: 2rem; }
.indent-3 { margin-left: 3rem; }

.structure-explanation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.explanation-item {
    padding: 1.5rem;
    background: #ffedd5;
    border-radius: 8px;
    border-left: 4px solid #f97316;
}

.explanation-item h3 {
    color: #ea580c;
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.explanation-item p {
    color: #57534e;
    margin: 0;
}

/* Tabs de Elementos */
.elements-tabs {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #fed7aa;
}

.tab-buttons {
    display: flex;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    overflow-x: auto;
    padding: 0.5rem;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #57534e;
    margin: 0.25rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #fed7aa;
    color: #ea580c;
}

.tab-btn.active {
    color: #ea580c;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.1);
}

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

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Editor HTML */
.element-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.html-editor {
    width: 100%;
    height: 300px;
    padding: 1rem;
    border: 2px solid #f97316;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    resize: vertical;
    background: #1e293b;
    color: #e2e8f0;
}

.html-editor-large {
    width: 100%;
    height: 400px;
    padding: 1rem;
    border: 2px solid #f97316;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    resize: vertical;
    background: #1e293b;
    color: #e2e8f0;
}

.update-demo {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.update-demo:hover {
    background: #ea580c;
}

.demo-preview {
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    min-height: 300px;
}

/* Atributos HTML */
.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.attribute-card {
    background: #ffedd5;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid #fed7aa;
}

.attribute-card h3 {
    color: #ea580c;
    margin-bottom: 1rem;
}

.attribute-card ul {
    list-style: none;
    padding-left: 0;
}

.attribute-card li {
    padding: 0.5rem 0;
    color: #57534e;
    border-bottom: 1px solid #fed7aa;
}

.attribute-card li:last-child {
    border-bottom: none;
}

.attribute-card code {
    background: #1e293b;
    color: #fbbf24;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.attribute-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: #fff7ed;
    padding: 2rem;
    border-radius: 10px;
}

.attribute-controls {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    color: #451a03;
    font-weight: 500;
}

.control-group input {
    padding: 0.8rem;
    border: 2px solid #fed7aa;
    border-radius: 6px;
    font-size: 1rem;
}

#apply-attributes {
    padding: 1rem 2rem;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#apply-attributes:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

.demo-element {
    padding: 2rem;
    border: 2px solid #fed7aa;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #451a03;
}

.generated-code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    overflow-x: auto;
}

/* Semántica HTML5 */
.semantic-demo {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.semantic-visual {
    background: #f8fafc;
    border: 2px solid #fed7aa;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.semantic-element {
    padding: 1rem;
    border-radius: 6px;
    position: relative;
    min-height: 60px;
}

.semantic-element > span {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: monospace;
}

/* Header original */
.head {
    background-color: #fafafa;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.head-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-link {
    text-decoration: none;
}

.logo {
    height: 50px;
    width: auto;
}

.header { background: #bfdbfe; border: 2px solid #3b82f6; }
.nav { background: #bbf7d0; border: 2px solid #10b981; }
.main { background: #fef3c7; border: 2px solid #f59e0b; }
.article { background: #e9d5ff; border: 2px solid #8b5cf6; }
.section { background: #fbcfe8; border: 2px solid #ec4899; }
.aside { background: #fecaca; border: 2px solid #ef4444; }
.footer { background: #c7d2fe; border: 2px solid #6366f1; }

.semantic-container {
    display: flex;
    gap: 1rem;
    min-height: 200px;
}

.semantic-container .semantic-element {
    flex: 1;
}

.inner-element {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #451a03;
    font-weight: bold;
}

.semantic-explanation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.semantic-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.semantic-item {
    padding: 1rem;
    background: #ffedd5;
    border-radius: 6px;
    border-left: 3px solid #f97316;
}

.semantic-item code {
    display: block;
    font-family: monospace;
    background: #1e293b;
    color: #fbbf24;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Multimedia */
.multimedia-demo {
    background: #fff7ed;
    border-radius: 10px;
    padding: 2rem;
}

.multimedia-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.media-btn {
    padding: 1rem 1.5rem;
    background: #fed7aa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #57534e;
    transition: all 0.3s ease;
}

.media-btn:hover {
    background: #fdba74;
}

.media-btn.active {
    background: #f97316;
    color: white;
}

.media-content {
    display: none;
}

.media-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.media-editor {
    margin-bottom: 2rem;
}

.media-editor pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.media-preview {
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #fed7aa;
}

/* Formularios Avanzados */
.advanced-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-builder {
    background: #fff7ed;
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid #fed7aa;
}

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

.form-controls select,
.form-controls input {
    padding: 0.8rem;
    border: 2px solid #fed7aa;
    border-radius: 6px;
    font-size: 1rem;
}

#add-field, #generate-code {
    padding: 1rem 1.5rem;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

#add-field:hover, #generate-code:hover {
    background: #ea580c;
}

#dynamic-form {
    padding: 2rem;
    border-radius: 8px;
    border: 2px dashed #fed7aa;
    margin-top: 1rem;
}

.form-code {
    background: #1e293b;
    border-radius: 10px;
    padding: 1rem;
}

#generated-form-code {
    color: #e2e8f0;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Validación y Accesibilidad */
.validation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.validation-card {
    border: 2px solid #fed7aa;
    border-radius: 10px;
    padding: 1.5rem;
}

.validation-card h3 {
    color: #ea580c;
    margin-bottom: 1rem;
}

.validation-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.validation-form input {
    padding: 0.8rem;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}

.validation-form input:invalid {
    border-color: #ef4444;
}

.validation-form input:valid {
    border-color: #10b981;
}

.validation-form button {
    padding: 1rem;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.aria-demo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#aria-button {
    padding: 1rem;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.alert {
    padding: 1rem;
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
}

.progress-container {
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ea580c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Editor en Vivo */
.live-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.editor-column, .preview-column {
    display: flex;
    flex-direction: column;
}

.live-preview-container {
    flex: 1;
    border: 2px solid #fed7aa;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.editor-controls {
    display: flex;
    gap: 1rem;
}

.editor-controls button {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#update-preview {
    background: #f97316;
    color: white;
}

#reset-editor {
    background: #fed7aa;
    color: #451a03;
}

#update-preview:hover {
    background: #ea580c;
}

#reset-editor:hover {
    background: #fdba74;
}

/* Recursos */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: #ffedd5;
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid #fed7aa;
}

.resource-card h3 {
    color: #ea580c;
    margin-bottom: 1rem;
}

.resource-card ul {
    list-style: none;
    padding-left: 0;
}

.resource-card li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #fed7aa;
}

.resource-card li:last-child {
    border-bottom: none;
}

.resource-card a {
    color: #f97316;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.resource-card a:hover {
    color: #ea580c;
    text-decoration: underline;
}

/* Consejos */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #f97316;
    transition: transform 0.3s ease;
}

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

.tip i {
    font-size: 2rem;
    color: #f97316;
    margin-bottom: 1rem;
}

.tip h3 {
    color: #451a03;
    margin-bottom: 0.5rem;
}

.tip p {
    color: #57534e;
    margin: 0;
}
