/* =================================================================
   ARQUIVO: assets/css/pages/resolucoes.css
   DESCRIÇÃO: Estilos para Hub, Lista de Prova e Questão Individual
   ================================================================= */

/* =========================================
   1. CONFIGURAÇÃO GERAL E FUNDO (GLOBAL DESTE MÓDULO)
   ========================================= */
/* Aplica o fundo escuro e configurações base para as 3 páginas:
   1. Hub (page-template-page-resolucoes)
   2. Single (single-resolucao)
   3. Lista/Taxonomia (tax-prova) 
*/
body.page-template-page-resolucoes,
body.single-resolucao,
body.tax-prova {
    background-color: #020617 !important;
    min-height: 100vh;
    color: #f8fafc;
    font-family: 'Inter', sans-serif; /* Garantia de fonte */
}

/* Grid Pattern (Deep Space) para todas as páginas acima */
body.page-template-page-resolucoes::before,
body.single-resolucao::before,
body.tax-prova::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -10; pointer-events: none;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px; 
    mask-image: radial-gradient(circle at center top, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center top, black 30%, transparent 100%);
}

/* =========================================
   2. LAYOUT DO HUB (MENU DE ANOS)
   ========================================= */
.resolucoes-hub-wrapper {
    max-width: 900px; 
    margin: 0 auto; 
    padding: 80px 20px 120px;
}

/* Header */
.hub-header { text-align: center; margin-bottom: 60px; }

.pill-badge {
    display: inline-block; padding: 6px 14px; border-radius: 6px;
    background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.2);
    color: #06b6d4; font-size: 0.75rem; font-weight: 700;
    margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.05em;
}

.hub-title { font-size: 3rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -0.03em; }
.hub-title .highlight { 
    background: linear-gradient(90deg, #fbbf24, #f59e0b); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
}
.hub-desc { color: #94a3b8; font-size: 1.1rem; max-width: 550px; margin: 0 auto; line-height: 1.6; }

/* Grid dos Cards */
.exams-grid { display: flex; flex-direction: column; gap: 16px; }

.exam-card-group {
    background: rgba(15, 23, 42, 0.6); /* Fundo Vidro Escuro */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 30px;
    display: flex; align-items: center; justify-content: space-between;
    transition: all 0.2s ease-out;
    backdrop-filter: blur(8px);
}

.exam-card-group:hover { 
    border-color: rgba(255, 255, 255, 0.2); 
    background: rgba(30, 41, 59, 0.8);
    transform: translateX(5px);
}

.year-label { 
    font-size: 1.8rem; font-weight: 800; color: #fff; 
    letter-spacing: -1px; font-variant-numeric: tabular-nums;
}

.exam-links { display: flex; gap: 10px; flex-wrap: wrap; }

.exam-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8; font-size: 0.85rem; font-weight: 600; 
    text-decoration: none; transition: 0.2s;
}

.exam-btn:hover { 
    background: #4f46e5; color: white; border-color: #4f46e5; 
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.exam-btn i { font-size: 0.7rem; transition: transform 0.2s; }
.exam-btn:hover i { transform: translateX(3px); }

/* Mobile do Hub */
@media (max-width: 600px) {
    .exam-card-group { flex-direction: column; align-items: flex-start; gap: 15px; }
    .exam-links { width: 100%; }
    .exam-btn { flex: 1; justify-content: center; }
    .hub-title { font-size: 2.2rem; }
}

/* =========================================
   3. ESTILOS DA LISTA DE QUESTÕES (TAXONOMIA)
   ========================================= */
/* Reutiliza o wrapper do Hub para manter alinhamento */
.archive-wrapper { max-width: 1100px; }

.archive-header { margin-top: 40px; }

.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: #94a3b8; text-decoration: none;
    margin-bottom: 20px; font-size: 0.9rem; transition: 0.2s;
}
.back-link:hover { color: #fff; transform: translateX(-5px); }

/* Grid de Questões (Mini Cards) */
.questions-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.q-mini-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex; flex-direction: column; height: 100%;
    backdrop-filter: blur(5px);
}

.q-mini-card:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: #4f46e5;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.q-mini-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.q-number { 
    font-size: 0.75rem; font-weight: 700; color: #fff; 
    background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 4px; 
}
.q-subject { font-size: 0.7rem; text-transform: uppercase; color: #94a3b8; letter-spacing: 0.5px; }

.q-mini-title {
    font-size: 1.1rem; color: #e2e8f0; margin: 0 0 20px 0; 
    font-weight: 500; line-height: 1.5; flex-grow: 1;
}

.q-mini-footer {
    font-size: 0.85rem; color: #4f46e5; font-weight: 700; 
    display: flex; align-items: center; gap: 8px; margin-top: auto;
}
.q-mini-card:hover .q-mini-footer { color: #818cf8; }

/* Paginação WP */
.pagination { margin-top: 60px; text-align: center; }
.pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; margin: 0 4px; border-radius: 8px;
    background: rgba(255,255,255,0.05); color: #fff; text-decoration: none;
    font-weight: 600; border: 1px solid transparent; transition: 0.2s;
}
.pagination .page-numbers.current {
    background: #4f46e5; border-color: #4f46e5;
}
.pagination .page-numbers:hover:not(.current) {
    background: rgba(255,255,255,0.15);
}

/* =========================================
   4. ESTILOS DA PÁGINA SINGLE (RESOLUÇÃO INDIVIDUAL)
   ========================================= */
.single-resolucao-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 100px;
}

/* Breadcrumbs Específicos */
.res-breadcrumbs {
    margin-bottom: 30px;
    color: #64748b; font-size: 0.9rem; font-weight: 500;
}
.res-breadcrumbs a { color: #94a3b8; text-decoration: none; transition: 0.2s; }
.res-breadcrumbs a:hover { color: #fff; }
.res-breadcrumbs i { font-size: 0.7rem; margin: 0 10px; opacity: 0.5; }
.res-breadcrumbs span:last-child { color: #f8fafc; font-weight: 600; }

/* Layout Grid: Conteúdo vs Sidebar */
.res-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* --- CARD DE PAPEL (CONTEÚDO) --- */
.res-content {
    background: #ffffff; /* Papel branco */
    color: #1e293b; /* Texto escuro */
    border-radius: 16px;
    padding: 50px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative; z-index: 2;
}

/* Header da Questão */
.res-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 30px; margin-bottom: 30px;
}
.tags-wrapper { margin-bottom: 15px; }
.q-tag { 
    display: inline-block; padding: 5px 12px; border-radius: 6px; 
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-right: 8px;
}
.q-tag.year { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.q-tag.type { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

.res-header h1 {
    font-size: 2.2rem; color: #0f172a; margin: 0;
    line-height: 1.2; letter-spacing: -0.02em;
}
.res-header .subtitle { color: #64748b; font-weight: 400; font-size: 1.5rem; }

/* Enunciado */
.enunciado-box {
    font-size: 1.15rem; line-height: 1.8; color: #334155;
    margin-bottom: 40px;
}
.enunciado-box p { margin-bottom: 20px; }

.q-image-container {
    text-align: center; margin: 40px auto; padding: 20px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 8px; width: 100%;
}
.q-image-container img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* Alternativas */
.alternativas-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 50px; }

.alt-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px; border: 1px solid #e2e8f0;
    border-radius: 10px; transition: 0.2s;
}

.alt-letter {
    flex-shrink: 0; width: 32px; height: 32px;
    background: #f1f5f9; color: #64748b; font-weight: 700;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; border: 1px solid #cbd5e1;
}
.alt-text { font-size: 1.05rem; color: #475569; padding-top: 4px; }

/* Efeito da Alternativa Correta */
.alt-item.correct-reveal {
    background: #ecfdf5; border-color: #10b981;
}
.alt-item.correct-reveal .alt-letter {
    background: #10b981; color: white; border-color: #10b981;
}
.alt-item.correct-reveal .alt-text {
    color: #064e3b; font-weight: 600;
}

/* Caixa de Resolução */
.resolucao-box {
    background: #f8fafc; border: 1px solid #cbd5e1;
    border-radius: 12px; padding: 35px;
    border-left: 5px solid #4f46e5;
}
.resolucao-box h3 {
    color: #4f46e5; font-size: 1.4rem; margin: 0 0 20px 0;
    display: flex; align-items: center; gap: 10px;
}
.res-text { font-size: 1.1rem; line-height: 1.8; color: #334155; margin-bottom: 30px; }

.gabarito-badge {
    display: inline-block; background: #4f46e5; color: white;
    padding: 8px 20px; border-radius: 50px;
    font-weight: 500; font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* --- SIDEBAR --- */
.res-sidebar { display: flex; flex-direction: column; gap: 25px; }

.sidebar-widget {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px; border-radius: 16px; color: #f8fafc;
}

.sidebar-widget h4 {
    margin: 0 0 20px 0; font-size: 0.85rem; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px;
}

.mini-nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }

.nav-q {
    background: rgba(255,255,255,0.05); color: #94a3b8;
    text-align: center; padding: 8px 0; border-radius: 6px;
    font-size: 0.85rem; text-decoration: none; transition: 0.2s; font-weight: 500;
}
.nav-q:hover { background: #fff; color: #020617; }
.nav-q.active {
    background: #4f46e5; color: white; font-weight: 700;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

.btn-sidebar {
    display: block; text-align: center;
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    color: white; padding: 12px; border-radius: 8px;
    text-decoration: none; font-weight: 600; margin-top: 15px; transition: 0.2s;
}
.btn-sidebar:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3); color: white; }

/* Responsivo Geral */
@media (max-width: 900px) {
    .res-layout { grid-template-columns: 1fr; }
    .res-content { padding: 30px; }
    .res-sidebar { order: 2; }
}