/* Last update: May 18, 2026 – 17:12 */
/* ============================================================
   GitCourse Framework — CSS Unificado (Refatorado por Copilot)
   Last update: May 04, 2026
   ============================================================ */

/* ---------- 0. Fontes ---------- */
@import url('https://fonts.googleapis.com/css2?family=Victor+Mono:wght@100..700&display=swap');

/* ---------- 1. Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- 2. Variáveis ---------- */
:root {
    --primary: #f14e32;
    --primary-dark: #d63916;
    --neutral: #6c757d;
    --bg-blur: rgba(255,255,255,0.75);
    --text-dark: #111;
    --text-body: #222;
    --text-soft: #444;
}

/* ---------- 3. Body Global ---------- */
body {
    background: url('/gitcourse-frontend-v2/assets/images/waves.webp')
               center/cover no-repeat fixed;
    font-family: 'Victor Mono', monospace;
    font-size: 18px;
    color: var(--text-body);
    line-height: 1.8;
}

/* Fallback para navegadores sem blur */
@supports not (backdrop-filter: blur(8px)) {
    body {
        background: #f5f5f5;
    }
}

/* ---------- 4. Container Principal ---------- */
.container {
    background: var(--bg-blur);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31,38,135,0.25);
    margin: 40px auto;
    padding: 40px;
    max-width: 900px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
}

@supports not (backdrop-filter: blur(8px)) {
    .container {
        background: rgba(255,255,255,0.95);
    }
}

/* ---------- 5. Tipografia ---------- */
h1, h2, h3, h4 {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; margin-bottom: 25px; }
h2 { font-size: 2rem; margin-top: 30px; }
h3 { font-size: 1.5rem; margin-top: 24px; }

p { margin-bottom: 1.2rem; }
li { margin-bottom: 10px; }

ul, ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

/* Parágrafos especiais */
.p-styled {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 1em;
}

.p-styled.spaced-p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-soft);
    font-weight: 400;
}

/* ---------- 6. Imagens Responsivas ---------- */
.img-full,
.img-half {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.img-half {
    max-width: min(400px, 90%);
}

/* ---------- 7. Botões Globais ---------- */
.btn,
.btn-footer-primary,
.btn-footer-secondary {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    transition: all 0.3s;
}

/* Botão base */
.btn {
    background: var(--primary);
    color: white;
}

/* Botão principal */
.btn-footer-primary {
    background: var(--primary) !important;
    color: white !important;
}

.btn-footer-primary:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
}

/* Botão secundário */
.btn-footer-secondary {
    background: rgba(255,255,255,0.7);
    color: var(--neutral);
}

.btn-footer-secondary:hover {
    background: rgba(255,255,255,0.9);
    color: var(--primary);
}

/* Botão de sucesso (para "Concluído ✓") */
.btn-success {
    background: #28a745 !important;
    color: white !important;
}

/* ---------- 8. Cards ---------- */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ---------- 9. Navegação entre aulas ---------- */
.nav-lesson {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

/* ---------- 10. Footer ---------- */
.footer {
    background-color: rgba(255,255,255,0.75);
    box-shadow: 0 8px 32px rgba(31,38,135,0.25);
    border-radius: 12px;
    padding: 20px;
    margin-top: 40px;
    backdrop-filter: blur(6px);
}

.footer-flex {
    display: flex;
    justify-content: space-between; /* Empurra os blocos para as extremidades e deixa o suporte no centro */
    align-items: center;            /* Alinha todos os botões verticalmente na mesma linha */
    width: 100%;
}

/* Garante que o bloco do centro fique perfeitamente centralizado */
.footer-support {
    display: flex;
    justify-content: center;
    flex-grow: 1; /* Permite que o bloco ocupe o espaço do meio harmonicamente */
}

.footer-nav {
    display: flex;
    gap: 15px;
}

.footer-link {
    color: var(--neutral);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.7);
    transition: all 0.3s;
}

.footer-link:hover {
    color: var(--primary);
    background: rgba(255,255,255,0.9);
}

.footer-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ---------- 11. Textos menores ---------- */
.footer-instruction,
.footer-copyright,
.github-link,
.w3c-link {
    font-size: 14px;
    opacity: 0.85;
}

/* ---------- 12. Badges ---------- */
.footer-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.github-link,
.w3c-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--neutral);
    text-decoration: none;
}

.github-link:hover,
.w3c-link:hover {
    color: var(--primary);
}

.footer-logo {
    height: 20px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-logo:hover {
    opacity: 1;
}

/* ---------- 13. Responsividade ---------- */
@media (max-width: 768px) {
    .github-pages-logo {
        width: 80px;
        top: 10px;
        right: 10px;
    }
}

/* ============================================================
   GRID COMPARATIVO — RESET x REVERT
   ============================================================ */

.grid-compare {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 25px 0;
    border: 1px solid rgba(48, 69, 5, 0.35);
    border-radius: 6px;
    overflow: hidden;
}

.grid-item {
    padding: 14px 18px;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(48, 56, 5, 0.25);
    border-bottom: 1px solid rgba(48, 56, 5, 0.25);
}

.grid-item.header {
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(48, 56, 5, 0.35);
}

.grid-item.title {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.08);
}

.grid-item:nth-child(3n) {
    border-right: none;
}

.grid-item:last-child,
.grid-item:nth-last-child(2),
.grid-item:nth-last-child(3) {
    border-bottom: none;
}

.td-desc {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* Responsividade do grid */
@media (max-width: 768px) {
    .grid-compare {
        grid-template-columns: 1fr;
    }

    .grid-item.header {
        text-align: left;
    }

    .grid-item:nth-child(3n) {
        border-right: 1px solid rgba(255, 255, 255, 0.25);
    }

    .grid-item {
        border-right: none;
    }
}


/* ==========================================================================
   NAVEGAÇÃO DO RODAPÉ (Cinza Claro & Texto Preto - Sutil)
   ========================================================================== */

.footer-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-link {
    font-family: 'Victor Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600; /* Texto ligeiramente mais espesso para garantir leitura em preto */
    color: #000000; /* Texto estritamente preto */
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid #d1d5db; /* Borda cinza clara para dar acabamento */
    border-radius: 6px;
    background-color: #f3f4f6; /* Fundo cinza bem claro e limpo */
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
}

/* Efeito ao passar o mouse (Hover) - Microinteração sutil */
.footer-link:hover {
    background-color: #e5e7eb; /* O cinza urbano desce um tom, ficando levemente mais escuro */
    border-color: #9ca3af; /* A borda ganha uma leve definição */
    transform: translateY(-1px); /* Micro-elevação mecânica */
}

/* Efeito ao clicar (Active) */
.footer-link:active {
    background-color: #d1d5db;
    transform: translateY(0);
}

/* ==========================================================================
   ESTILIZAÇÃO DO TERMINAL (PrismJS Calibrado para Alto Contraste)
   ========================================================================== */

pre[class*="language-"] {
    position: relative;
    border: 1px solid #2d3748;
    border-radius: 8px;
    background: #121824 !important; /* Um tom ligeiramente mais escuro para destacar o texto */
    padding: 40px 18px 18px 18px !important; /* Espaço generoso para a barra superior e conteúdo */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Sombra externa suave na caixa, não no texto */
}

/* Simulação da barra de terminal (Os três pontos do Mac/Linux) */
pre[class*="language-"]::before {
    content: "● ● ●  bash";
    position: absolute;
    top: 12px;
    left: 15px;
    font-family: 'Victor Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #4a5568; /* Cor discreta para os botões simulados */
    letter-spacing: 2px;
}

/* 🎯 CORREÇÃO DE LEGIBILIDADE: Força o texto interno a ficar nítido */
pre[class*="language-"] code {
    font-family: 'Victor Mono', monospace !important;
    color: #e2e8f0 !important; /* Cinza bem claro (quase branco) para leitura limpa */
    text-shadow: none !important; /* ELIMINA qualquer efeito de sombra antiga do PrismJS */
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Garante que tokens específicos do Prism (como strings ou palavras-chave) 
   não fiquem escuros demais contra o fundo novo */
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    background: transparent !important;
}

.token.command, .token.function, .token.builtin {
    color: #60a5fa !important; /* Azul Starship nítido para comandos principais */
    font-weight: 600;
}

.token.string {
    color: #34d399 !important; /* Verde esmeralda nítido para textos/parâmetros entre aspas */
}

/* Barra de rolagem minimalista */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ==========================================================================
   MELHORIAS DE EXPERIÊNCIA SPA & INTERFACE (Animação e Scroll)
   ========================================================================== */

/* 1. Transição Suave (Fade-In + Micro-deslocamento) 
   Adicione esta classe na div principal da 'home-view.js' e 'progresso-view.js' */
.fade-in {
    animation: fadeInSlide 0.25s ease-out forwards;
    will-change: opacity, transform; /* Otimização de hardware para renderização */
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(6px); /* Começa ligeiramente abaixo */
    }
    to {
        opacity: 1;
        transform: translateY(0);    /* Estabiliza na posição original */
    }
}

/* 2. Barra de Rolagem Minimalista (Estilo Terminal Moderno)
   Compatível com Chrome, Edge, Safari e navegadores baseados em WebKit */
::-webkit-scrollbar {
    width: 6px;  /* Largura fina e discreta para rolagem vertical */
    height: 6px; /* Altura fina para eventual rolagem horizontal */
}

/* O "trilho" por onde a barra corre */
::-webkit-scrollbar-track {
    background: transparent; /* Mantém o fundo limpo e invisível */
}

/* O "ponteiro" ou controle que o usuário arrasta */
::-webkit-scrollbar-thumb {
    background-color: #4b5563; /* Cinza médio sóbrio */
    border-radius: 20px;       /* Cantos totalmente arredondados */
    transition: background-color 0.2s ease;
}

/* Quando o usuário passa o mouse sobre a barra de rolagem */
::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280; /* Escurece sutilmente para dar feedback visual */
}

/* Suporte para Firefox (Nativo) */
* {
    scrollbar-width: thin;
    scrollbar-color: #4b5563 transparent;
}

/* ==========================================================================
   BOTÃO DE SUPORTE (BOIA DE SALVAMENTO)
   ========================================================================== */

.btn-footer-support {
    background-color: #ef6c00; /* Laranja caloroso (cor de suporte/atenção) */
    color: #ffffff;            /* Texto em branco para alto contraste */
    font-weight: 700;          /* Texto em negrito para facilitar a leitura */
    border: none;              /* Sem bordas brutas */
    padding: 8px 18px;         /* Espaçamento interno confortável */
    border-radius: 4px;        /* Cantos suavizados combinando com o padrão */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;                  /* Espaço perfeito entre o emoji/ícone e o texto */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Leve profundidade */
}

/* Efeito ao passar o mouse (Hover) */
.btn-footer-support:hover {
    background-color: #e65100; /* Tom de laranja ligeiramente mais escuro */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Sombra expande sutilmente */
}

/* Efeito ao clicar (Feedback tátil) */
.btn-footer-support:active {
    transform: scale(0.98);    /* Micro-redução para simular o clique mecânico */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}