/* tutorials.css - Clean, consistent styles for tutorial pages */

/* === VARIABLES === */
:root {
    /* Color variables from article.css */
    --primary-dark: #000000;
    --primary-bg: #0a0a0a;
    --secondary-bg: #111111;
    --accent-color: #00ff41;
    --accent-dark: #00cc33;
    --accent-light: #66ff99;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #2a2a2a;
    --card-bg: rgba(17, 17, 17, 0.8);
    --gradient-primary: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    --shadow-glow: 0 0 10px rgba(0, 255, 65, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    
    /* New variables for tutorials */
    --tutorial-hero-height: 400px;
    --tutorial-header-padding: 3rem 0 2rem;
    --card-border-radius: 8px;
    --step-number-size: 3rem;
}

/* === RESET AND BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Oxanium', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* === BREADCRUMB NAVIGATION === */
nav[aria-label="Migas de pan"] {
    background: var(--secondary-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 0.5rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li::after {
    content: "›";
    margin: 0 0.75rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.breadcrumb li:last-child::after {
    display: none;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.breadcrumb li[aria-current="page"] {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.95rem;
}

/* === MAIN CONTAINER === */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* === TUTORIAL ARTICLE === */
.tutorial-article {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    overflow: hidden;
}

/* === ARTICLE HEADER === */
.article-header {
    padding: 3rem 2rem 2rem;
    background: var(--gradient-primary);
    border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.article-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.author strong {
    color: var(--accent-color);
}

.date {
    color: var(--text-muted);
}

/* === FEATURED IMAGE === */
.featured-image {
    margin: 0;
    position: relative;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.featured-image figcaption {
    padding: 1rem 2rem;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

/* === ARTICLE INTRO === */
.article-intro {
    padding: 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.article-intro p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* === CONTENT SECTIONS === */
section {
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

section ul,
section ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

section img {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: var(--card-border-radius);
    margin: 1.5rem auto;
    box-shadow: var(--shadow-card);
}

/* === STEP CONTENT === */
.step-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.step-content:hover {
    border-left-color: var(--accent-light);
    box-shadow: var(--shadow-glow);
}

.step-content h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.step-content ul,
.step-content ol {
    margin-left: 1.5rem;
}

.step-content li {
    margin-bottom: 0.75rem;
}

.step-content a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.step-content a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

/* === FAQ SECTION === */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.faq-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* === ARTICLE FOOTER === */
.article-footer {
    padding: 2rem;
    background: var(--secondary-bg);
    border-top: 2px solid var(--accent-color);
}

.article-footer p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.call-to-action {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    text-align: center;
}

.call-to-action p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.call-to-action a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.call-to-action a:hover {
    color: var(--accent-light);
}

/* === CONTAINER === */
.tutorial-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* === TUTORIAL LAYOUT === */
.tutorial-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.tutorial-main-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* === TUTORIAL HEADER === */
.tutorial-header {
    padding: var(--tutorial-header-padding);
    background: var(--gradient-primary);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.tutorial-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tutorial-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tutorial-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tutorial-badge {
    background: var(--accent-color);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* === HERO SECTION === */
.tutorial-hero {
    margin: 2rem 0;
    position: relative;
}

.tutorial-hero-image {
    width: 100%;
    height: var(--tutorial-hero-height);
    object-fit: cover;
    border-radius: var(--card-border-radius);
    box-shadow: var(--shadow-card);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-bottom-left-radius: var(--card-border-radius);
    border-bottom-right-radius: var(--card-border-radius);
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-specs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.spec-badge {
    background: var(--accent-color);
    color: var(--primary-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* === CONTENT SECTIONS === */
.tutorial-section {
    margin-bottom: 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    padding: 2rem;
    transition: all 0.3s ease;
}

.tutorial-section:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

/* === STEP-BY-STEP TUTORIAL === */
.tutorial-step {
    position: relative;
    margin-bottom: 2rem;
    padding-left: calc(var(--step-number-size) + 1rem);
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--step-number-size);
    height: var(--step-number-size);
    background: var(--gradient-accent);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

/* === CODE BLOCKS === */
.tutorial-code {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    overflow-x: auto;
}

.tutorial-code code {
    color: var(--accent-light);
}

/* === FEATURES GRID === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon i {
    color: var(--primary-dark);
    font-size: 1.5rem;
}

/* === ALERTS AND NOTICES === */
.tutorial-alert {
    padding: 1.5rem;
    border-radius: var(--card-border-radius);
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(0, 102, 255, 0.1);
    border-color: #0066ff;
}

.alert-warning {
    background: rgba(255, 153, 0, 0.1);
    border-color: #ff9900;
}

.alert-success {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--accent-color);
}

.alert-danger {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff0000;
}

/* === RELATED TUTORIALS === */
.related-tutorials {
    padding: 3rem 0;
    background: var(--primary-bg);
    border-top: 1px solid var(--border-color);
}

.related-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
    color: inherit;
}

.related-image {
    height: 200px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 1.5rem;
}

.related-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.related-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.bg-primary { background-color: var(--primary-bg); }
.bg-secondary { background-color: var(--secondary-bg); }
.bg-accent { background-color: var(--accent-color); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-color); }

.border { border: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-left { border-left: 1px solid var(--border-color); }
.border-right { border-right: 1px solid var(--border-color); }

.border-radius { border-radius: var(--card-border-radius); }
.border-radius-sm { border-radius: 4px; }

.shadow { box-shadow: var(--shadow-card); }
.shadow-glow { box-shadow: var(--shadow-glow); }

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .article-container {
        padding: 1.5rem;
    }
    
    .tutorial-container {
        padding: 0 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 0 1rem;
        font-size: 0.85rem;
    }

    .breadcrumb li::after {
        margin: 0 0.5rem;
    }
    
    .article-container {
        padding: 1rem;
    }
    
    .article-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .featured-image figcaption {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .article-intro {
        padding: 1.5rem;
    }

    section {
        padding: 2rem 1.5rem;
    }

    section img {
        max-width: 100%;
        margin: 1.25rem auto;
    }

    .step-content {
        padding: 1.25rem;
    }
    
    .tutorial-container {
        padding: 0 1rem;
    }
    
    .tutorial-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tutorial-step {
        padding-left: 0;
        margin-left: calc(var(--step-number-size) + 0.5rem);
    }
    
    .step-number {
        left: -calc(var(--step-number-size) + 0.5rem);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-specs {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        padding: 0 0.75rem;
        font-size: 0.8rem;
    }

    .article-container {
        padding: 0.5rem;
    }

    .article-header {
        padding: 1.5rem 1rem;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-meta {
        font-size: 0.85rem;
    }

    .featured-image img {
        height: auto;
        max-height: 250px;
        object-fit: cover;
    }

    .featured-image figcaption {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .article-intro {
        padding: 1rem;
    }

    .article-intro p {
        font-size: 1rem;
    }

    section {
        padding: 1.5rem 1rem;
    }

    section h2 {
        font-size: 1.4rem;
    }

    section img {
        max-width: 100%;
        margin: 1rem auto;
    }

    .step-content {
        padding: 1rem;
    }

    .step-content h3 {
        font-size: 1.1rem;
    }

    .faq-item {
        padding: 1rem;
    }

    .faq-item h3 {
        font-size: 1.1rem;
    }

    .article-footer {
        padding: 1.5rem 1rem;
    }

    .call-to-action {
        padding: 1rem;
    }

    .call-to-action p {
        font-size: 0.95rem;
    }
    
    .tutorial-hero-image {
        height: 250px;
    }
    
    .tutorial-section {
        padding: 1rem;
    }
    
    .tutorial-header {
        padding: 2rem 0 1rem;
    }
}