/* =========================================
   VARIÁVEIS E RESET BÁSICO
   ========================================= */
:root {
    --primary-color: #4a47a3;
    --secondary-color: #ff5e7e;
    --bg-color: #f4f6f9;
    --text-color: #333;
    --sidebar-width: 280px;
    --right-sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* =========================================
   ESTRUTURA GERAL (COLUNAS)
   ========================================= */
#sidebar-left-container {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #eaeaea;
    padding: 30px 20px 40px 20px; /* Aumentado o padding inferior para o texto respirar */
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto; /* PERMITE ROLAGEM NO MENU QUANDO A TELA FOR PEQUENA */
}

/* Oculta a barra de rolagem visualmente, mas mantém a funcionalidade */
#sidebar-left-container::-webkit-scrollbar {
    width: 4px;
}
#sidebar-left-container::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-right: var(--right-sidebar-width);
    padding: 40px 60px;
    max-width: 1200px;
}

#sidebar-right-container {
    width: var(--right-sidebar-width);
    background: #fff;
    border-left: 1px solid #eaeaea;
    padding: 20px;
    position: fixed;
    height: 100vh;
    right: 0;
    top: 0;
    overflow-y: auto;
}

/* =========================================
   MENU LATERAL ESQUERDO
   ========================================= */
.brand {
    text-align: center;
    margin-bottom: 40px;
}

.brand img {
    width: 140px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-links li {
    margin-bottom: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.coffee-donation {
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eaeaea;
}

/* =========================================
   GRID DE MÓDULOS 
   ========================================= */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.module-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

a.module-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.module-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.module-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* =========================================
   DESTAQUE DO VÍDEO
   ========================================= */
.video-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.video-section video {
    width: 100%;
    max-width: 950px; 
    aspect-ratio: 16 / 9; 
    object-fit: contain; 
    border-radius: 12px;
    background: #111;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* =========================================
   DOWNLOAD SECTION
   ========================================= */
.download-section {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}

.store-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.store-buttons img {
    height: 50px;
    width: auto;
    transition: opacity 0.2s;
}

.store-buttons a:hover img {
    opacity: 0.8;
}

/* =========================================
   BOTAO MOBILE MENU
   ========================================= */
.mobile-menu-btn {
    display: none;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 20px;
}

/* =========================================
   RESPONSIVIDADE (MOBILE)
   ========================================= */
@media (max-width: 1024px) {
    body {
        flex-direction: column;
        padding-bottom: 80px; /* Garante que o site role além da barra de anúncio fixa */
    }

    #sidebar-left-container {
        transform: translateX(-100%);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }

    #sidebar-left-container.active {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
        margin-right: 0;
        padding: 20px;
    }

    /* BARRA DE ANÚNCIO FIXA NA BASE (MOBILE) */
    #sidebar-right-container {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        height: 80px; /* Altura fixa para o banner de anúncio */
        border-left: none;
        border-top: 1px solid #eaeaea;
        padding: 10px;
        z-index: 998;
        background: #fff;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden; /* Evita que anúncios grandes quebrem o layout */
    }

    .mobile-menu-btn {
        display: inline-block;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }
}