@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700&family=Lora:ital,wght@0,400;0,600;1,400&family=Gloria+Hallelujah&display=swap');

:root {
    --primary: #B8860B;
    /* Ouro Antigo */
    --secondary: #1F2937;
    /* Cinza Escuro */
    --bg-page: #FDF8F3;
    /* Papel Antigo */
    --bg-card: #FFFFFF;
    --font-heading: 'Lora', serif;
    --font-body: 'Outfit', sans-serif;
    /* Outfit */
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-page);
    color: var(--secondary);
    font-family: var(--font-body);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

/* Layout Grid */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #E5E7EB;
    padding: 2rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
}

.main-content {
    margin-left: 280px;
    padding: 3rem 4rem;
    width: 100%;
    max-width: 1400px;
}

/* Sidebar */
.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-section {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9CA3AF;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 2rem 0 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    color: #4B5563;
}

.nav-link:hover {
    background: #FEF3C7;
    color: #92400E;
}

.nav-link.active {
    background: #FFFBEB;
    color: #B45309;
    border-left: 3px solid #F59E0B;
}

.nav-link small {
    margin-left: auto;
    font-size: 0.7rem;
    color: #D1D5DB;
}

/* Header */
header {
    margin-bottom: 4rem;
}

.role-badge {
    background: #E0E7FF;
    color: #3730A3;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    color: #111827;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #6B7280;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Stats Row */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.85rem;
    color: #6B7280;
    font-weight: 500;
}

/* Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2rem;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-meta {
    font-size: 0.9rem;
    color: #9CA3AF;
}

/* Grid Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #F3F4F6;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.1);
    border-color: #FCD34D;
}

/* Card Variants (Guardians) */
.card.celeste {
    border-top: 4px solid #F97316;
}

/* Raposa Laranja */
.card.bernardo {
    border-top: 4px solid #8B5CF6;
}

/* Urso Roxo/Forte */
.card.noe {
    border-top: 4px solid #10B981;
}

/* Coruja Verde/Sabedoria */
.card.iris {
    border-top: 4px solid #EC4899;
}

/* Pássaro Rosa/Beleza */
.card.melquior {
    border-top: 4px solid #F59E0B;
}

/* Leão Dourado/Rei */
.card.raizes {
    border-top: 4px solid #4B5563;
    border-style: dashed;
}

/* Raízes (Diferente) */

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.card-id {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #9CA3AF;
    text-transform: uppercase;
    background: #F3F4F6;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1F2937;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.95rem;
    color: #6B7280;
    font-style: italic;
    margin-bottom: 1rem;
}

.guardian-icon-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #FEF3C7;
    padding: 2px;
    background: white;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #F3F4F6;
    background: #FAFAFA;
    display: flex;
    justify-content: flex-end;
}

.btn-arr {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4B5563;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-arr span {
    transition: transform 0.2s;
}

.btn-arr:hover span {
    transform: translateX(3px);
}

.btn-arr:hover {
    color: #B45309;
}

/* Empty States */
.blog-empty {
    text-align: center;
    padding: 4rem;
    background: #F9FAFB;
    border-radius: 12px;
    border: 2px dashed #E5E7EB;
    opacity: 0.7;
}

.blog-empty h3 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.blog-empty p {
    color: #6B7280;
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* MOBILE NAVIGATION REFINED (Drawer Style) */
.mobile-toggle {
    display: none;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

@media (max-width: 1024px) {
    .sidebar {
        display: block;
        /* Restored */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        width: 80%;
        max-width: 300px;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
    }

    .main-content {
        margin-left: 0;
        padding: 2rem;
        padding-top: 6rem;
    }

    .mobile-toggle {
        display: flex;
        position: fixed;
        top: 1.5rem;
        left: 1.5rem;
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 50%;
        background: white;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        z-index: 60;
        font-size: 1.5rem;
        border: none;
        color: var(--primary);
        cursor: pointer;
        transition: transform 0.2s;
    }

    .mobile-toggle:active {
        transform: scale(0.95);
    }
}

/* LESSON PAGE SPECIFIC (Premium Visuals) */
.lesson-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 4rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    position: relative;
}

.home-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
    z-index: 10;
    filter: grayscale(1);
}

.home-btn:hover {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.1);
}

.lesson-hero {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.lesson-meta-tag {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: #9CA3AF;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: #1F2937;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-quote {
    font-family: var(--font-heading);
    font-style: italic;
    color: #6B7280;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-guardian {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #FEF3C7;
    padding: 4px;
    background: white;
    margin-top: 1rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

/* Typography for Lesson Body */
.lesson-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #4B5563;
}

.lesson-body h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: #B45309;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #FFE4E6;
    padding-bottom: 0.5rem;
}

.lesson-body h3 {
    font-size: 1.4rem;
    color: #1F2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.lesson-body ul {
    list-style: none;
    margin-bottom: 2rem;
    padding-left: 0;
}

.lesson-body li {
    padding: 0.75rem 0;
    border-bottom: 1px dashed #E5E7EB;
    color: #4B5563;
    display: flex;
    gap: 0.75rem;
}

.lesson-body li::before {
    content: "•";
    color: #F59E0B;
    font-weight: bold;
}

/* Rich Objects */
.script-persona-block {
    background: #FDF2F8;
    border-left: 4px solid #EC4899;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.script-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.script-content {
    flex: 1;
}

.script-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #BE185D;
    margin-bottom: 0.25rem;
    display: block;
}

.script-text {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    color: #831843;
    line-height: 1.5;
    margin: 0;
}

.instruction-box {
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    color: #1E40AF;
}

.instruction-icon {
    font-size: 1.5rem;
}

/* Navigation Footer */
.lesson-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.2s;
    max-width: 45%;
}

.nav-btn:hover {
    background: #F3F4F6;
}

.nav-btn.disabled {
    opacity: 0;
    pointer-events: none;
}

.nav-btn .nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9CA3AF;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.nav-btn .nav-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #1F2937;
    font-weight: 600;
}

.nav-btn.prev {
    text-align: left;
}

.nav-btn.next {
    text-align: right;
}

@media (max-width: 768px) {
    .lesson-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .lesson-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn {
        max-width: 100%;
        text-align: center !important;
        background: #F9FAFB;
    }
}