/* 
==============================
🎓 CSS GENÉRICO PARA AULAS WEB
==============================
Arquivo: style-aulas.css
Descrição: Estilos padronizados para todas as aulas
Autor: Template HTML-CSS
Data: Janeiro 2025
*/

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ===== CONTAINER PRINCIPAL ===== */
.aula-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* ===== HEADER DA AULA ===== */
.aula-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-radius: 15px 15px 0 0;
    margin: -20px -20px 40px -20px;
    position: relative;
    overflow: hidden;
}

.aula-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="0%" r="100%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><rect width="100%" height="100%" fill="url(%23a)"/></svg>');
    pointer-events: none;
}

.aula-numero {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 300;
}

.aula-titulo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.aula-descricao {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.aula-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.meta-item span {
    font-weight: 600;
}

/* ===== NAVEGAÇÃO ENTRE AULAS ===== */
.aula-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 15px;
}

.nav-btn {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.nav-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.nav-btn.disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
}

.nav-btn.disabled:hover {
    transform: none;
    background: #bdc3c7;
}

/* ===== OBJETIVOS DA AULA ===== */
.objetivos {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 5px solid #f39c12;
    position: relative;
}

.objetivos h3 {
    color: #d68910;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.objetivos ul {
    list-style: none;
}

.objetivos li {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
    color: #8b6f00;
    font-weight: 500;
}

.objetivos li::before {
    content: '🎯';
    position: absolute;
    left: 0;
    top: 0;
}

/* ===== SEÇÕES DE CONTEÚDO ===== */
.secao {
    margin-bottom: 40px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.secao h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    display: flex;
    align-items: center;
    gap: 10px;
}

.secao h3 {
    color: #34495e;
    margin: 25px 0 15px 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.secao h4 {
    color: #5d6d7e;
    margin: 20px 0 10px 0;
    font-size: 1.2rem;
}

.secao p {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.7;
}

.secao ul, .secao ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.secao li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ===== BLOCOS DE CÓDIGO ===== */
.codigo {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    border: 1px solid #34495e;
}

.codigo::before {
    content: attr(data-lang);
    position: absolute;
    top: 10px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.codigo pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.codigo code {
    font-family: inherit;
    font-size: inherit;
    background: none;
    color: inherit;
    padding: 0;
}

/* Syntax highlighting */
.codigo .tag { color: #e74c3c; }
.codigo .attr { color: #f39c12; }
.codigo .string { color: #2ecc71; }
.codigo .comment { color: #95a5a6; font-style: italic; }
.codigo .keyword { color: #9b59b6; font-weight: bold; }

/* ===== CAIXAS DE DESTAQUE ===== */
.destaque {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 5px solid;
    position: relative;
}

.destaque.info {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
    color: #155724;
}

.destaque.warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #ffc107;
    color: #856404;
}

.destaque.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #dc3545;
    color: #721c24;
}

.destaque.tip {
    background: linear-gradient(135deg, #cce5ff, #b3d9ff);
    border-color: #007bff;
    color: #004085;
}

.destaque h4 {
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.destaque.info h4::before { content: '✅'; }
.destaque.warning h4::before { content: '⚠️'; }
.destaque.error h4::before { content: '❌'; }
.destaque.tip h4::before { content: '💡'; }

/* ===== EXERCÍCIOS PRÁTICOS ===== */
.exercicio {
    background: linear-gradient(135deg, #e8f5e8, #d4f4dd);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    position: relative;
}

.exercicio::before {
    content: '🏋️‍♂️ EXERCÍCIO PRÁTICO';
    position: absolute;
    top: -12px;
    left: 20px;
    background: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.exercicio h4 {
    color: #155724;
    margin-bottom: 15px;
    margin-top: 10px;
}

.exercicio-resultado {
    background: white;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.exercicio-resultado h5 {
    color: #155724;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exercicio-resultado h5::before {
    content: '🎯';
}

/* ===== TABELAS ===== */
.tabela-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #3498db;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

tr:hover {
    background: #f8f9fa;
}

tr:last-child td {
    border-bottom: none;
}

/* ===== CARDS DE RECURSOS ===== */
.recursos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.recurso-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recurso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.recurso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recurso-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recurso-card p {
    color: #5d6d7e;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.recurso-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.recurso-link:hover {
    color: #2980b9;
}

/* ===== CHECKLIST DE PROGRESSO ===== */
.checklist {
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.checklist h4 {
    color: #2980b9;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist h4::before {
    content: '📋';
}

.checklist ul {
    list-style: none;
    padding: 0;
}

.checklist li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.checklist input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checklist label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.checklist li:hover {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
    margin: 4px -10px 8px -10px;
}

/* ===== FOOTER DA AULA ===== */
.aula-footer {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 40px;
    border: 1px solid #e9ecef;
}

.aula-footer h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.aula-footer p {
    color: #5d6d7e;
    margin-bottom: 20px;
}

.proxima-aula {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.proxima-aula:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .aula-container {
        margin: 10px;
        padding: 15px;
        border-radius: 12px;
    }
    
    .aula-header {
        padding: 30px 15px;
        margin: -15px -15px 30px -15px;
    }
    
    .aula-titulo {
        font-size: 2rem;
    }
    
    .aula-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .aula-nav {
        flex-direction: column;
    }
    
    .nav-btn {
        text-align: center;
        justify-content: center;
    }
    
    .secao {
        padding: 20px;
    }
    
    .codigo {
        font-size: 0.8rem;
        padding: 15px;
    }
    
    .recursos {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .aula-titulo {
        font-size: 1.8rem;
    }
    
    .secao h2 {
        font-size: 1.5rem;
    }
    
    .secao h3 {
        font-size: 1.3rem;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aula-container {
    animation: fadeIn 0.6s ease-out;
}

.secao {
    animation: fadeIn 0.8s ease-out;
}

/* ===== ACESSIBILIDADE ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* ===== SCROLL SUAVE ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .aula-container,
    .secao {
        animation: none;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    body {
        background: white;
    }
    
    .aula-container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .aula-nav,
    .aula-footer {
        display: none;
    }
    
    .aula-header {
        background: #2c3e50 !important;
        color: white !important;
        margin: 0;
        padding: 20px;
    }
    
    .secao {
        break-inside: avoid;
        background: white;
        border: 1px solid #ccc;
    }
    
    .codigo {
        background: #f8f9fa;
        color: #2c3e50;
        border: 1px solid #ccc;
    }
}

/* ===== NAVEGAÇÃO DO CURSO ===== */
.course-navigation {
    margin: 3rem 0 2rem;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 200px;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), #4dabf7);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

.nav-btn.secondary {
    background: white;
    color: var(--text-color);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-btn.secondary:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
        min-width: auto;
    }
    
    .course-navigation {
        margin: 2rem 0 1rem;
        padding: 1.5rem;
    }
}
