:root {
    --bg-body: #ffffff;
    --texto-body: #000000;
    --bg-conteudo: #f4f4f9;
    --bg-card: #ffffff;
    --border-card: #e0e0e0;
    --texto-card: #333333;
    --texto-suave: #666666;
    --bg-input: #ffffff;
    --border-input: #ccc;
    --texto-input: #333333;
    --cor-destaque: #6c5ce7;
    --tamanho-fonte: 16px;
}


/* =========================================================
   MODO ESCURO
========================================================= */

body.modo-escuro {
    --bg-body: #121212;
    --texto-body: #ffffff;
    --bg-conteudo: #121212;
    --bg-card: #1e1e1e;
    --border-card: #333333;
    --texto-card: #ffffff;
    --texto-suave: #aaa;
    --bg-input: #2a2a2a;
    --border-input: #444;
    --texto-input: #ffffff;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:
        "Knewave",
        cursive,
        sans-serif;
}


/* =========================================================
   BODY
========================================================= */

body {
    background-color: var(--bg-body);
    color: var(--texto-body);
    display: flex;
    min-height: 100vh;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    font-size: var(--tamanho-fonte);
}


/* =========================================================
   MENU LATERAL
========================================================= */

.navbar-lateral {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: var(--cor-destaque);
    padding-top: 70px;
    z-index: 1000;
    transition: width 0.3s ease;
    overflow: hidden;
}

.navbar-lateral ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar-lateral li {
    width: 100%;
}

.navbar-lateral a {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.2s ease;
}

.navbar-lateral a:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

.navbar-lateral a i {
    width: 25px;
    min-width: 25px;
    text-align: center;
    font-size: 18px;
}


/* =========================================================
   BOTÃO DO MENU
========================================================= */

.btn-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
}

.btn-toggle:hover {
    background-color: rgba(0, 0, 0, 0.35);
}


/* =========================================================
   MENU RECOLHIDO
========================================================= */

.navbar-lateral.recolhido {
    width: 75px;
}

.navbar-lateral.recolhido a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.navbar-lateral.recolhido a span {
    display: none;
}


/* =========================================================
   CONTEÚDO PRINCIPAL
========================================================= */

.conteudo-pagina {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: var(--bg-conteudo);
    overflow-x: hidden;
    transition:
        margin-left 0.3s ease,
        background-color 0.3s ease;
}

.navbar-lateral.recolhido ~ .conteudo-pagina {
    margin-left: 75px;
}


/* =========================================================
   NAVBAR / PESQUISA
========================================================= */

.navbar-custom {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px;
    background-color: transparent;
}

.navbar-custom .container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.navbar-custom form {
    width: 100%;
    max-width: 900px;
}


/* =========================================================
   CAMPO DE PESQUISA
========================================================= */

.search-input {
    height: 50px;
    font-size: 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--texto-input);
}

.search-input:focus {
    background-color: var(--bg-input);
    color: var(--texto-input);
    border-color: var(--cor-destaque);
    box-shadow:
        0 0 0 0.2rem
        rgba(108, 92, 231, 0.2);
}

.search-input::placeholder {
    color: var(--texto-suave);
    opacity: 1;
}


/* =========================================================
   BOTÃO DE PESQUISA
========================================================= */

.search-btn {
    min-width: 130px;
    height: 50px;
    background-color: #942b2b !important;
    border: 1px solid #af3d26 !important;
    color: #ffffff !important;
    font-family:
        "Londrina Shadow",
        cursive,
        sans-serif;
    font-size: 18px;
}

.search-btn:hover {
    background-color: #CD4956 !important;
    color: #ffffff !important;
}

.search-btn:active,
.search-btn:focus {
    background-color: #A93743 !important;
    color: #ffffff !important;
}


/* =========================================================
   BOTÕES DE CATEGORIA
========================================================= */

.btn-categoria {
    padding: 10px 18px;
    border-radius: 20px;
    background-color: #333333;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.btn-categoria:hover {
    background-color: #555555;
    color: #ffffff;
}

.btn-categoria:active {
    transform: scale(0.97);
}


/* =========================================================
   SEÇÃO DE CARDS
========================================================= */

.card-secao {
    width: 100%;
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    color: var(--texto-card);
    border: 1px solid var(--border-card);
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.card-secao h2 {
    margin-bottom: 20px;
    color: var(--texto-card);
}


/* =========================================================
   GRID DE ARQUIVOS
========================================================= */

#arquivosCategoria {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(220px, 1fr)
        );
    gap: 20px;
}


/* =========================================================
   ITEM DE ARQUIVO
========================================================= */

.arquivo-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 20px;
    color: var(--texto-card);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.3s ease,
        border-color 0.3s ease;
}

.arquivo-item:hover {
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px
        rgba(0, 0, 0, 0.12);
}

.arquivo-item h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    word-break: break-word;
    color: var(--texto-card);
}

.arquivo-item p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--texto-suave);
}

.arquivo-item .btn {
    margin-top: 10px;
}


/* =========================================================
   BOTÕES GERAIS
========================================================= */

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    background-color: #333;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.btn:hover {
    background-color: #444;
}

.btn:active {
    transform: scale(0.97);
}


/* =========================================================
   BOTÃO DESTAQUE
========================================================= */

.btn-destaque {
    background-color: #0066cc;
    color: #ffffff;
}

.btn-destaque:hover {
    background-color: #004b99;
    color: #ffffff;
}


/* =========================================================
   BOTÃO VERMELHO
========================================================= */

.btn-vermelho {
    background-color: #a288cf5f;
    color: #ffffff;
}

.btn-vermelho:hover {
    background-color: #a288cf5f;
    color: #ffffff;
}


/* =========================================================
   BOTÃO FILTRO
========================================================= */

.btn-filtro {
    margin-bottom: 20px;
}


/* =========================================================
   CABEÇALHO DE IDEIAS
========================================================= */

.cabecalho-ideias {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}


/* =========================================================
   NAVBAR DE ABAS
========================================================= */

.navbar-abas ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom:
        1px solid var(--border-card);
    padding-bottom: 10px;
    overflow-x: auto;
}

.navbar-abas ul li a {
    color: var(--texto-suave);
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}

.navbar-abas ul li a.ativo,
.navbar-abas ul li a:hover {
    color: var(--texto-card);
    border-bottom:
        2px solid var(--texto-card);
    padding-bottom: 8px;
}


/* =========================================================
   GRID DE PASTAS
========================================================= */

.grid-pastas {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(200px, 1fr)
        );
    gap: 20px;
}


/* =========================================================
   ITEM DE PASTA
========================================================= */

.item-pasta {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border:
        1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    transition:
        transform 0.2s ease,
        background-color 0.3s ease,
        border-color 0.3s ease;
}

.item-pasta:hover {
    transform: translateY(-3px);
}

.item-pasta h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--texto-card);
}

.item-pasta p {
    font-size: 0.85rem;
    color: var(--texto-suave);
}


/* =========================================================
   MODO ESCURO - ELEMENTOS BOOTSTRAP
========================================================= */

body.modo-escuro .search-input {
    background-color: var(--bg-input);
    color: var(--texto-input);
}

body.modo-escuro .search-input::placeholder {
    color: var(--texto-suave);
}

body.modo-escuro .form-control:focus {
    background-color: var(--bg-input);
    color: var(--texto-input);
}


/* =========================================================
   RESPONSIVIDADE - ATÉ 800PX
========================================================= */

@media (max-width: 800px) {

    .navbar-lateral {
        width: 75px;
    }

    .navbar-lateral a {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .navbar-lateral a span {
        display: none;
    }

    .conteudo-pagina {
        margin-left: 75px;
        padding: 20px;
    }

    .navbar-custom form {
        max-width: 100%;
    }

    .search-input {
        min-width: 0;
    }

    .search-btn {
        min-width: 100px;
    }

}


/* =========================================================
   RESPONSIVIDADE - ATÉ 500PX
========================================================= */

@media (max-width: 500px) {

    .conteudo-pagina {
        padding: 15px;
    }

    .navbar-custom form {
        flex-direction: column;
        gap: 10px;
    }

    .search-input {
        width: 100%;
        margin-right: 0 !important;
    }

    .search-btn {
        width: 100%;
    }

    #arquivosCategoria {
        grid-template-columns: 1fr;
    }

    .card-secao {
        padding: 18px;
    }

    .arquivo-item {
        padding: 16px;
    }

}


/* =========================================================
   MODO ESCURO - CARDS
========================================================= */

body.modo-escuro .card-secao,
body.modo-escuro .arquivo-item,
body.modo-escuro .item-pasta {
    background-color: var(--bg-card);
    border-color: var(--border-card);
    color: var(--texto-card);
}


/* =========================================================
   MODO ESCURO - TÍTULOS
========================================================= */

body.modo-escuro .card-secao h2,
body.modo-escuro .arquivo-item h3,
body.modo-escuro .item-pasta h3 {
    color: var(--texto-card);
}


/* =========================================================
   MODO ESCURO - TEXTOS
========================================================= */

body.modo-escuro .arquivo-item p,
body.modo-escuro .item-pasta p {
    color: var(--texto-suave);
}