/**
 * Academia de Gutiska Razda — Folha de Estilos Oficial EAD
 * Arquivo: public/assets/css/ead.css
 * Identidade visual nórdica sagrada, compatível com odinismo.com.br
 */

:root {
    --ead-bg: #0e0e0d;
    --ead-bg-card: #151513;
    --ead-bg-card-hover: #1c1c19;
    --ead-bg-elevated: #1e1d1a;
    --ead-gold: #ebc080;
    --ead-gold-dim: rgba(235, 192, 128, 0.15);
    --ead-gold-border: rgba(235, 192, 128, 0.3);
    --ead-border: #2a2722;
    --ead-text: #dedad2;
    --ead-text-muted: #9e988d;
    --ead-text-bright: #f5f1e8;
    --ead-green: #34d399;
    --ead-green-dim: rgba(52, 211, 153, 0.15);
    --ead-serif: 'EB Garamond', Georgia, serif;
    --ead-display: 'Cinzel', serif;
    --ead-sans: 'Inter', system-ui, sans-serif;
    --ead-gothic: 'Noto Sans Gothic', monospace;
}

/* Base Wrapper */
.ead-page {
    background-color: var(--ead-bg);
    color: var(--ead-text);
    font-family: var(--ead-sans);
    min-height: 100vh;
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

.ead-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
}

/* Tipografia Sagrada */
.ead-h1, .ead-h2, .ead-h3 {
    font-family: var(--ead-serif);
    color: var(--ead-text-bright);
    letter-spacing: 0.02em;
    margin: 0 0 0.5rem 0;
}

.ead-display-title {
    font-family: var(--ead-display);
    color: var(--ead-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ead-glyph {
    font-family: var(--ead-gothic);
    color: var(--ead-gold);
    font-size: 1.35em;
    letter-spacing: 0.1em;
    line-height: 1;
}

/* Badges e Pílulas */
.ead-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--ead-gold-dim);
    border: 1px solid var(--ead-gold-border);
    color: var(--ead-gold);
}

.ead-pill--green {
    background: var(--ead-green-dim);
    border-color: rgba(52, 211, 153, 0.35);
    color: var(--ead-green);
}

/* Cards & Containers */
.ead-card {
    background: var(--ead-bg-card);
    border: 1px solid var(--ead-border);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.25s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.ead-card:hover {
    border-color: var(--ead-gold-border);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}

/* Grades Flexíveis */
.ead-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.ead-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.ead-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.ead-layout-main-sidebar {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .ead-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .ead-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .ead-layout-main-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ead-grid-4, .ead-grid-3, .ead-grid-2 { grid-template-columns: 1fr; }
}

/* Botões do EAD */
.ead-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.ead-btn--gold {
    background: linear-gradient(135deg, #ebc080 0%, #c79a4e 100%);
    color: #121210;
    box-shadow: 0 4px 15px rgba(235, 192, 128, 0.25);
}

.ead-btn--gold:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ead-btn--ghost {
    background: var(--ead-bg-card);
    border: 1px solid var(--ead-border);
    color: var(--ead-text);
}

.ead-btn--ghost:hover {
    background: var(--ead-bg-card-hover);
    border-color: var(--ead-gold-border);
    color: var(--ead-gold);
}

.ead-btn--outline {
    background: transparent;
    border: 1px solid var(--ead-gold-border);
    color: var(--ead-gold);
}

.ead-btn--outline:hover {
    background: var(--ead-gold-dim);
}

/* Barra de Progresso */
.ead-progress-bar-wrap {
    width: 100%;
    background: #1a1a18;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    border: 1px solid var(--ead-border);
}

.ead-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #c79a4e, #ebc080);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

/* Callouts Didáticos */
.ead-callout {
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    background: #141311;
    border-left: 4px solid var(--ead-gold);
    margin: 1.5rem 0;
    color: #d6d0c4;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ead-callout--ancient {
    border-left-color: #d97706;
    background: rgba(217, 119, 6, 0.08);
}

/* Flashcards 3D */
.ead-flashcard-stage {
    perspective: 1000px;
    width: 100%;
    max-width: 550px;
    height: 320px;
    margin: 0 auto;
    cursor: pointer;
}

.ead-flashcard-inner {
    width: 100%;
    height: 100%;
    border-radius: 1.25rem;
    padding: 2.5rem;
    background: radial-gradient(circle at 50% 30%, #1c1b18 0%, #121210 100%);
    border: 2px solid var(--ead-gold-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.4s ease;
}

.ead-flashcard-inner:hover {
    border-color: var(--ead-gold);
}

/* Tabelas Didáticas */
.ead-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--ead-border);
    border-radius: 0.75rem;
    background: #121210;
    margin: 1.5rem 0;
}

.ead-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.ead-table th {
    background: #191815;
    padding: 0.85rem 1.1rem;
    color: var(--ead-gold);
    font-family: var(--ead-display);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--ead-border);
}

.ead-table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(42, 39, 34, 0.6);
    color: #dedad2;
}

.ead-table tr:hover td {
    background: rgba(235, 192, 128, 0.04);
}

/* Certificado Oficial */
.ead-cert-frame {
    background: #131210;
    border: 4px double #3d3527;
    border-radius: 1rem;
    padding: 3.5rem 3rem;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.ead-cert-inner-border {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(235, 192, 128, 0.25);
    border-radius: 0.6rem;
    pointer-events: none;
}

/* Utilitários complementares de layout */
.ead-flex { display: flex; }
.ead-flex-between { display: flex; justify-content: space-between; align-items: center; }
.ead-flex-center { display: flex; justify-content: center; align-items: center; }
.ead-gap-1 { gap: 0.5rem; }
.ead-gap-2 { gap: 1rem; }
.ead-gap-3 { gap: 1.5rem; }
.ead-mt-2 { margin-top: 1rem; }
.ead-mt-3 { margin-top: 1.5rem; }
.ead-mb-2 { margin-bottom: 1rem; }
.ead-text-center { text-align: center; }
.ead-text-gold { color: var(--ead-gold); }
.ead-text-muted { color: var(--ead-text-muted); }

/* Acordeões e Módulos */
.ead-module-accordion {
    background: var(--ead-bg-card);
    border: 1px solid var(--ead-border);
    border-radius: 0.85rem;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}
.ead-module-accordion.is-locked {
    opacity: 0.65;
    background: #11110f;
    border-color: #22201c;
}
.ead-module-header {
    padding: 1.1rem 1.4rem;
    background: #171714;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: background 0.2s ease;
}
.ead-module-header:hover {
    background: #1c1c19;
}
.ead-module-accordion.open .ead-module-header {
    border-bottom-color: var(--ead-border);
}
.ead-module-content {
    display: none;
    padding: 0.75rem 1.25rem;
    background: var(--ead-bg-card);
}
.ead-module-accordion.open .ead-module-content {
    display: block;
}
.ead-lesson-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
    color: var(--ead-text);
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}
.ead-lesson-row:last-child {
    border-bottom: none;
}
.ead-lesson-row:hover:not(.is-locked) {
    background: rgba(235, 192, 128, 0.05);
    color: var(--ead-gold);
}
.ead-lesson-row.is-current {
    background: var(--ead-gold-dim);
    color: var(--ead-gold);
    font-weight: 600;
}
.ead-lesson-row.is-locked {
    cursor: not-allowed;
    opacity: 0.5;
}
.ead-lesson-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-family: monospace;
    background: #22211e;
    color: #888;
    flex-shrink: 0;
}
.ead-lesson-num.done {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
}
.ead-lesson-num.current {
    background: rgba(235, 192, 128, 0.25);
    color: var(--ead-gold);
    border: 1px solid var(--ead-gold);
}
